Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to [substr] anomaly or mine?

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.

Replies are listed 'Best First'.
Re: Re: [substr] anomaly or mine?
by BrowserUk (Patriarch) on Aug 20, 2002 at 00:07 UTC

    Using the 4 parm form is working as expected! It's the other version that is giving me a headache!


    What's this about a "crooked mitre"? I'm good at woodwork!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://191343]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-26 01:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found