<p>In <a href="https://stackoverflow.com/questions/204467/is-there-a-perl-function-to-turn-a-string-into-a-regexp-to-use-that-string-as-p">another Stack&nbsp;Overflow question</a> <a href="https://stackoverflow.com/users/4727/leon-timmermans">Leon Timmermans</a> asserted:</p>

<blockquote>
  <p>I would advice you not to use prototypes. They have their uses, but not for most cases and definitely not in this one.</p>
</blockquote>

<p>Why might this be true (or otherwise)? I almost always supply prototypes for my Perl functions, and I've never before seen anyone else say anything bad about using them.</p>

The problem is that Perl's function prototypes don't do what people think they do.  Their purpose is to allow you to write functions that will be parsed like Perl's built-in functions.
First of all, method calls completely ignore prototypes.  If you're doing OO programming, it doesn't matter what prototype your methods have.  (So they shouldn't have any prototype.)
Second, prototypes aren't strictly enforced.  If you call a subroutine with
```
&function(...)
```
, the prototype is ignored.  So they don't really provide any type safety.
Third, they're spooky action-at-a-distance.  (Especially the
```
$
```
prototype, which causes the corresponding parameter to be evaluated in scalar context, instead of the default list context.)
In particular, they make it hard to pass parameters from arrays.  For example:
```
```
my @array = qw(a b c);

foo(@array);
foo(@array[0..1]);
foo($array[0], $array[1], $array[2]);

sub foo ($;$$) { print "@_\n" }

foo(@array);
foo(@array[0..1]);
foo($array[0], $array[1], $array[2]);
```
```
prints:
```
```
a b c
a b
a b c
3
b
a b c
```
```
along with 3 warnings about
```
main::foo() called too early to check prototype
```
(if warnings are enabled).  The problem is that an array (or array slice) evaluated in scalar context returns the length of the array.
If you need to write a function that acts like a built-in, use a prototype.  Otherwise, don't use prototypes.
Note:  Perl 6 will have completely revamped and very useful prototypes.  This answer applies only to Perl 5.