in reply to •Re: Re: Perl Syntax that we generally don't know or forget.
in thread Perl Syntax/resources that we generally don't know or forget.

Like this?. Or is there something I'm missing here..
sub attack :lvalue { substr($_[0], 2, 1) ; }

-Lee

"To be civilized is to deny one's nature."
  • Comment on Re: •Re: Re: Perl Syntax that we generally don't know or forget.
  • Download Code

Replies are listed 'Best First'.
Re: Re: •Re: Re: Perl Syntax that we generally don't know or forget.
by ysth (Canon) on Jan 19, 2004 at 02:12 UTC
    That is supposed to work, but currently has some problems (see perl bug #24200) if you call attack in an rvalue context after calling it in an lvalue context.