Don't ask to ask, just ask | |
PerlMonks |
Re: Omitted subroutine argumentsby moritz (Cardinal) |
on Mar 15, 2011 at 09:17 UTC ( [id://893265]=note: print w/replies, xml ) | Need Help?? |
arg1, , arg3 and arg1, arg3 are exactly the same to perl, it simply ignores the additional comma. So you can't really omit an argument. In Perl 5, arguments are simply passed as a list. You can use an empty string or undef or any value that pleases you, but "omitting" doesn't really work. Maybe it will make your code clearer if pass a hash reference of arguments instead?
or some such.
In Section
Seekers of Perl Wisdom
|
|