Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How do I insert, (not overwrite) into a string?

by redcloud (Parson)
on Aug 24, 2000 at 22:32 UTC ( [id://29489]=note: print w/replies, xml ) Need Help??


in reply to How do I insert (not overwrite) into a string?

Just to follow-up KM and davorg, note that you can use substr() as an lvalue. It's just syntactic sugar, but I like the taste of it. 8^)
use strict; my $str = "ello"; substr($str,0,0) = "H"; print $str, "\n";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2024-04-25 14:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found