Hai All,

   I have a directory with more files.. Some file contains a pattern as
<td bgcolor=#99ccff valign="bottom" align="right"><img
src="http://yahoo.com/corner_4.gif"; width="10" height="10"></td>
<td bgcolor=#ff6600 valign=top width=10 align="left"><img
src="http://yahoo.com/corner_1.gif"; width="10" height="10"></td>
and lot of more lines.. with out the key word yahoo.com

    I want to change the above line as
<td bgcolor=#99ccff valign="bottom" align="right">
<sample>
<img src="http://perl.com/corner_4.gif"; width="10" height="10">
</sample>
</td>


<snip>

yahoo domain must be changed to perl.Where the keyword is yahoo domain.

Using the shell scipt I have done it easily. how to do it in perl..

cat $filename | sed -e 's/<img/\
<sample>\
<img/g' | sed -e '/http/s/yahoo/perl/g' | sed -e 's/td>$/td>\
<\\sample>/g'


Thanks for reviewed help for this.
Muthukumar.





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to