vsespb has asked for the wisdom of the Perl Monks concerning the following question:
$ perl -MData::Dumper -e 'sub t{ $_+=1 for @_}; my %h = (1 => 2, 3 => +4); t(%h); print Dumper \%h'
One could expect:$VAR1 = { '1' => 3, '3' => 5 };
$VAR1 = { '2' => 3, '4' => 5 };
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Modifying hash keys via aliasing
by roboticus (Chancellor) on Aug 10, 2015 at 22:36 UTC | |
Re: Modifying hash keys via aliasing
by ikegami (Patriarch) on Aug 10, 2015 at 22:43 UTC | |
by vsespb (Chaplain) on Aug 10, 2015 at 22:49 UTC | |
Re: Modifying hash keys via aliasing (strings)
by tye (Sage) on Aug 11, 2015 at 00:56 UTC | |
by vsespb (Chaplain) on Aug 11, 2015 at 08:32 UTC | |
Re: Modifying hash keys via aliasing
by Anonymous Monk on Aug 10, 2015 at 22:37 UTC | |
Re: Modifying hash keys via aliasing
by Laurent_R (Canon) on Aug 11, 2015 at 08:59 UTC | |
by Discipulus (Canon) on Aug 11, 2015 at 09:41 UTC | |
by Laurent_R (Canon) on Aug 11, 2015 at 11:51 UTC |