evalEmpire / perl5i

A single module to fix as much of Perl 5 as possible in one go
http://search.cpan.org/perldoc?perl5i
Other
156 stars 42 forks source link

modification of hash keys as $_ in loop. #124

Open exodist opened 14 years ago

exodist commented 14 years ago

"s/.../.../g for values %hash" works fine to modify every value, however "s/.../.../g for keys %hash" does not. It would be nice if that could be made to work

A use case is parsing CGI params where both keys and values contain hex, and it has already been turned into a hash:

"s/.../.../g for keys %hash, values %hash" could be done.

s/.../.../g for each %hash" would be even nicer, but each doesn't work like that

schwern commented 14 years ago

This should fall out of a real fix for hash keys that turns them into real SVs.