Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by turnstep (Parson)
on Aug 23, 2000 at 20:08 UTC ( #29243=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > How do I insert, (not overwrite) into a string? - Answer contributed by turnstep

Regular expressions can handle this just fine as well:
my $string = "ello"; $string =~ s/^/Henry said H/;

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2017-09-23 02:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (270 votes). Check out past polls.

    Notices?