At 12:41 PM 12/3/01 -0600, Mark Hanson wrote: >How can I permanently modify a hash key?
Delete the original element and add a new one.
($newkey = $oldkey) =~ s/foo/bar/;
$hash{$newkey} = delete $hash{$oldkey};
This isn't something I find myself doing at all often. Doing so *may* be a
sign of a suboptimal design.
--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
