in reply to Re: silly question
in thread silly question

Not entirely non-destructive. It's pretty damaging to %args. I'd suggest (although messy) if you wanted to keep the previous value of %args and merge in the new, you could do this:
%args = (%args, map { split /=/ } @ARGV);

Replies are listed 'Best First'.
RE: RE: Re: silly question
by chromatic (Archbishop) on Apr 28, 2000 at 19:34 UTC
    I'm not sure whether this is better or worse. I suspect performance is better when %args is larger. If you're not interested in clobbering @_, use a temporary array. This won't win me any Perl golf either: map { @_ = split /=/; $args{$_[0]} = $_[1]; } @data;