Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: loop execution

by mr.nick (Chaplain)
on Oct 25, 2001 at 01:12 UTC ( [id://121272] : note . print w/replies, xml ) Need Help??


in reply to loop execution

Try this:
foreach $Line (@code) { $Line =~ s!"(.*)"!<b>"$1"</b>!g; print "$Line\n"; }
The "g" modifier means to replace globally, not just once (which is the default).

mr.nick ...

Replies are listed 'Best First'.
Re: Re: loop execution
by staeryatz (Monk) on Oct 25, 2001 at 08:18 UTC
    Thanks!! It worked great. Now I'm off to fix up the rest of my program, and worry about other issues. ;)