in reply to Re: Modifying hash keys via aliasing
in thread Modifying hash keys via aliasing
>perl -MData::Dumper -Mstrict -e 'sub t{ map {$_+=1 } @_}; my %h = (1 +=> 2, 3 => 4); %h = t(%h); print Dumper \%h' $VAR1 = { '4' => 5, '2' => 3 };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Modifying hash keys via aliasing
by Laurent_R (Canon) on Aug 11, 2015 at 11:51 UTC |