On Aug 19, 2004, at 11:55 AM, Christopher J. Bottaro wrote:
Gunnar Hjalmarsson wrote:
You can use substr() as an rvalue:
substr($str1, 4, 8 - length $str1, $str2);
or if the length of $str1 is given:
substr($str1, 4, -4, $str2); # probably fastest
i don't understand why the 3rd argument is negative.
Then you didn't read the documentation I sent you the link for. ;)
A negative index counts backwards from the end of the string.
James
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>