Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

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

by Ovid (Cardinal)
on Aug 23, 2000 at 20:10 UTC ( #29246=categorized answer: print w/replies, xml ) Need Help??

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

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
Chatterbox?
[Copacetic]: I'm a new user. If I select "submit" for a new question it goes to a "Permission Denied" page. Why is this?
[LanX]: does it say why?

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2017-05-25 23:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?