in reply to Re^4: map and grep (but for hashes)
in thread map and grep (but for hashes)
local @_ = ($_[$i],$_[$i+1]); $code->(@_) and push @rv, @_;
is the same as
my @args = ($_[$i],$_[$i+1]); $code->(@args) and push @rv, @args;
Did you mean the following (which allows elements to be added and removed from @_) or did you repurpose a package variable for nothing?
local @_ = ($_[$i],$_[$i+1]); &$code and push @rv, @_;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: map and grep (but for hashes)
by shmem (Chancellor) on Jan 31, 2009 at 00:09 UTC |