Keep It Simple, Stupid | |
PerlMonks |
RE: Passing named parametersby ChOas (Curate) |
on May 02, 2000 at 10:50 UTC ( [id://9901]=note: print w/replies, xml ) | Need Help?? |
Hi! Eeehm you might want to put ' thingies around your keys aswel that hash, that might help and for B: I'd think this'd work: sub do_this_cool_function(@) { my %Param=@_; # Now address your params like this: my $When=$Param{'-retire'}; my $Wages=$Param('-payscale'}; my $Favourite_temperature=$Param{'-pizza'}; } That's how I'd do it.
In Section
Seekers of Perl Wisdom
|
|