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 Ovid (Cardinal)
on Aug 23, 2000 at 20:10 UTC ( [id://29246]=note: print w/replies, xml ) Need Help??


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

There are several methods to do this. Shendal has listed one. Here are a couple of others:
# Concatenation my $str = 'ello'; $str = 'H' . $str; # Regex my $str = 'ello'; $str =~ s/^(.*)$/H$1/;
Cheers,
Ovid

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-18 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found