in reply to Re^3: Changing parameters
in thread Changing parameters
But if you insist, I can tell you how I'd do it!
First, instead of ($var, $val) = @ARGV, which maps one pair only, I'd use an associative array to slurp in multiple pairs:
%updates = @ARGV;
Now, instead of $var I need to iterate over the values of %updates, and instead of $val I need to say $updates{whatever-the-curent-var-name-is}.
Probably this has taken me enough time already, so please assemble the parts yourself :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Changing parameters
by sparkel (Acolyte) on Nov 29, 2004 at 18:26 UTC |