in reply to Re: Enforcing formal arguments at compile time?
in thread Enforcing formal arguments at compile time?
Actually prototypes don't always work the way you might expect (see links in node below):
#!/usr/bin/perl use strict; sub foo($); my @ary = (4,3,2); foo(@ary); # no compile time error sub foo($) { print shift }
gmax points out I should run my code before posting as I forgot the my to satisfy strict. Ooops :-)
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Enforcing formal arguments at compile time?
by pdcawley (Hermit) on May 03, 2002 at 11:44 UTC | |
by tachyon (Chancellor) on May 03, 2002 at 12:07 UTC | |
by pdcawley (Hermit) on May 03, 2002 at 15:52 UTC |