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

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

by KM (Priest)
on Aug 23, 2000 at 20:06 UTC ( #29242=categorized answer: print w/replies, xml ) Need Help??

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

Another way to do it:

my $str = "ello"; substr($str,0,0,"H");

Cheers,
KM

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
[1nickt]: How old are your sprogs marto?
[marto]: 4, if they're good they#ll make it to 5 :P
[1nickt]: Mpph didn;t have twins bu I remember thinking that the "terrible twos" was a misnomer as age 4 seemed to be much more difficult.
LanX 4 kids and wanting to upgrade to 5? wow! ! !
[1nickt]: My lads are 15 and 31 now and both drive me just as crazy as when little, just less frequently.
[LanX]: ;p
[marto]: LanX I'd rather commit sudoku :P
[marto]: trench humour folks, feeling rough.

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (10)
As of 2017-11-18 18:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (277 votes). Check out past polls.

    Notices?