On Apr 14, 2004, at 2:19 PM, John W. Krahn wrote:

On Wednesday 14 April 2004 11:47, [EMAIL PROTECTED] wrote:

On Apr 14, 2004, at 2:06 AM, Bryan Harris wrote:

The above line could also be written:

substr $_, index($_, $ss), length($ss), $rs;

Wouldn't it be this instead?


substr $_, index($_, $ss), length($ss) = $rs;

That won't work. Because of precedence it evaluates to:


substr $_, index($_, $ss), ( length($ss) = $rs );

Ah yes, good catch as always John. To fix the above method you need:


substr($_, index($_, $ss), length($ss)) = $rs;

James


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to