Function arguments in Perl
a.k.a. URGHHH...
The three ways you want to remember are:
If you don't know exactly what's coming, roll it all in a hash:
sub perlFunc { my %args = @_; print $args{what_was_that_again}; return(%args); }Or, if you do know what's coming:
sub otherPerlFunc { my ($what_was_that_again, $oh_yeah, $never_mind) = @_; }And finally, if it's a single parameter you might as well just:
sub oneMorePerlFunc { my $singleValue = shift; }
