On Jun 2, 9:18 am, [EMAIL PROTECTED] (Steve Bertrand) wrote:
> > testsub(35);
>
> You call the sub with one parameter, integer 35. However, this won't
> work as calling the sub before the sub is defined with a prototype will
> barf with an error.

No it won't.  It will print a warning, if and only if you've enabled
warnings.

$ perl -le'
testsub(35);
sub testsub($) {
  print @_;
}
'
35

$ perl -wle'
testsub(35);
sub testsub($) {
  print @_;
}
'
main::testsub() called too early to check prototype at -e line 2.
35


Paul Lalli


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to