Given that initializing the hash just requires you list a bunch of keys and values, this can be simplified:
@{$h}{qw/ month year day first_name /}= delete # New keys @{$h}{qw/ mm yyyy dd name /}; # Old keys
Yeah, I added some extra braces.
- tye
In reply to Re^4: can i rename hashref keys? (...simplified)
by tye
in thread can i rename hashref keys?
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |