Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

( #29244=categorized answer: print w/ replies, xml ) Need Help??

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

my $str = 'ello'; my $char = 'H'; print $str, "\n"; substr($str, 0, 0, $char); print $str, "\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2016-08-27 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (376 votes). Check out past polls.