Je 2003-09-17 10:21:50 +0100, Robin Berjon skribis:
> sub foo { @_==2 ? shift->{foo} = shift : shift->{foo} }
sub foo { @_==2 ? $_[0]->{foo} = $_[1] : $_[0]->{foo} }
Probably marginally quicker, and doesn't leave that niggly feeling about
which shift might be evaluated in what order in a future version of
perl, etc, etc.
Paul
--
Paul Makepeace ....................................... http://paulm.com/
"If lawnmovers have souls, then we should sit very quietly until it
passes."
-- http://paulm.com/toys/surrealism/