laziness, impatience, and hubris | |
PerlMonks |
Re: color a letter in an arrayby l.frankline (Hermit) |
on Nov 24, 2006 at 08:46 UTC ( [id://585834]=note: print w/replies, xml ) | Need Help?? |
hi, the below code will certainly help you. @arr = (A..H,S,E,K,A,R,J..T,S,E,K,A,R,A..Z);$text = join "",@arr; $text =~s#SEKAR#<font>$&</font>#g; print $text; Result: ABCDEFGH<font>SEKAR</font>JKLMNOPQRST<font>SEKAR</font>ABCDEFGHIJKLMNOPQRSTUVWXYZ bye Don't put off till tomorrow, what you can do today.
In Section
Seekers of Perl Wisdom
|
|