more useful options | |
PerlMonks |
Prototyping - is it necessary?by bioMan (Beadle) |
on Aug 31, 2005 at 17:51 UTC ( [id://488167]=perlquestion: print w/replies, xml ) | Need Help?? |
bioMan has asked for the wisdom of the Perl Monks concerning the following question: I am playing around with modules, and have created a very simple test module. However, it has a bug.
I am running ActivePerl 5.8.7 on Win2000. When I used the above package in a short test program with the statement:
I got a "too many arguments" error that was rectified by modifying line 6 of the package to:
I didn't think prototyping was necessary. Am I wrong? I want $chomp to be an optional parameter with a default value of undef, but prototyping forces me to explicitly include a value for $chomp whenever I call getFileData. Retitled by g0n from 'prototyping'.
Back to
Seekers of Perl Wisdom
|
|