in reply to Passing named parameters to subroutines
B) I usually just do something like this--load the parameters into a hash:
From glancing at its code, CGI.pm does some really fancy stuff under the hood to rearrange the named parameters. I've never found that necessary for my purposes, but it may be worth checking out if you feel the need to go advanced. :)sub do_this_cool_function { my %params = @_; for my $k (keys %params) { print $k, " => ", $params{$k}, "\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jcwren) RE: Re: Passing named parameters to subroutines
by jcwren (Prior) on May 02, 2000 at 04:08 UTC |