in reply to Insert text in a string

Since you already know what position you want to insert in this string, you could use the following fragment:

$_="href=www.perlmonks.org"; substr($_,5,0)="http://";

metadoktor

"The doktor is in."

Replies are listed 'Best First'.
Re: Re: Insert text in a string
by chaskins (Sexton) on Jan 18, 2002 at 14:48 UTC
    I should have mentioned that I have to do this for a html page full of links and there could be more than one of these links per line. Would I use something similar again?

    Cheers
    Chris