in reply to Re^5: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs? (ugly++)
in thread Why doesn't Perl provide %_ as the hash equivalent of @_ in subs?
sub withNames{ local %_ = @_; ++$_{$_} for keys %_; };;
Try ++$_ for values %_;
:P lol
Yeah, local %_=@_; is not hard to type :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^7: Why doesn't Perl provide %_ as the hash equivalent of @_ in subs? (ugly++)
by BrowserUk (Patriarch) on Sep 28, 2013 at 07:02 UTC |
In Section
Meditations