Just another Perl shrine | |
PerlMonks |
Re: [substr] anomaly or mine?by Aristotle (Chancellor) |
on Aug 19, 2002 at 23:52 UTC ( [id://191343]=note: print w/replies, xml ) | Need Help?? |
An alternative to using substr() as an lvalue is to specify the replacement string as the 4th argument. This allows you to replace parts of the EXPR and return what was there before in one operation, just as you can with splice().That could be read as though without using the fourth parameter, you cannot get what was there before - but I get the feeling that that's twiddling words too much and it really is not expected behaviour. (I'm a lot of help, am I?) Makeshifts last the longest.
In Section
Seekers of Perl Wisdom
|
|