main::(-e:1): 0 DB<1> @h{ a..c } = 1..3 DB<2> x \%h 0 HASH(0x33c38e0) 'a' => 1 'b' => 2 'c' => 3 DB<3> %h2 = reverse %h DB<4> x \%h2 0 HASH(0x3554090) 1 => 'a' 2 => 'b' 3 => 'c' DB<5>
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Is there a way to switch a hash values <> keys with a slice?
by LanX
in thread Is there a way to switch a hash values <> keys with a slice?
by misterperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |