Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: color a letter in an array

by l.frankline (Hermit)
on Nov 24, 2006 at 08:46 UTC ( [id://585834]=note: print w/replies, xml ) Need Help??


in reply to color a letter in an array

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://585834]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2024-04-20 01:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found