how to insert string in a string -> not tie

I got the tie part, now how can i insert a string in a string?
for example, I have to add string in this string
<TR><TD>CFF</TD><TD>level 1</TD><!--INS1J--></TR>

add the string before my string marker <!--INS1J-->

so the final string may look like this
<TR><TD>CFF</TD><TD>level 1</TD>ADDSTRINGHERE<!--INS1J--></TR>

J
Jane [ Do, 11 Mai 2006 22:13 ] [ ID #1311498 ]

Re: how to insert string in a string -> not tie

Jane wrote:
> I got the tie part, now how can i insert a string in a string?
> for example, I have to add string in this string
> <TR><TD>CFF</TD><TD>level 1</TD><!--INS1J--></TR>
>
> add the string before my string marker <!--INS1J-->
>
> so the final string may look like this
> <TR><TD>CFF</TD><TD>level 1</TD>ADDSTRINGHERE<!--INS1J--></TR>

Use the s/// operator or combine the index() and substr() functions.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
Gunnar Hjalmarsson [ Do, 11 Mai 2006 22:43 ] [ ID #1311499 ]
Perl » alt.perl » how to insert string in a string -> not tie

Vorheriges Thema: Problem installing XML::Xerces
Nächstes Thema: insert string after line number n