On Wed, 17 Sep 2003, Paul Makepeace wrote: > 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.
Still Perl-related, sorry... Has there ever been a proposal to alias $0, $1... to $_[0], $_[1]... at the beginning of a sub? That would be convenient for that kind of quick convenience method/function (not to mention that it would improve golf scores). -- Michel Rodriguez Perl & XML http://www.xmltwig.com