Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: coloring patterns of an array

by Samy_rio (Vicar)
on Feb 05, 2007 at 05:51 UTC ( [id://598257]=note: print w/replies, xml ) Need Help??


in reply to coloring patterns of an array

Hi Tony1, try like this

use strict; use warnings; my $str = 'mASVKSSSSSSSSSFISLLLLILLVIVLQSQVIECQPQQSCTASLTGLNVCAPFLVPGS +PTASTECCNAVQSINHDCMCNTMRIAAQIPAQCNLPPLSCSANSSS'; $str =~ s/(.{10})/$1 /g; $str =~ s/(S{3,})/<font color=red>$1<\/font>/g; $str =~ s/<\/font> <font color=red>/ /g; print $str; __END__ Output is: ---------- mASVK<font color=red>SSSSS SSSS</font>FISLLL LILLVIVLQS QVIECQPQQS CTA +SLTGLNV CAPFLVPGSP TASTECCNAV QSINHDCMCN TMRIAAQIPA QCNLPPLSCS AN<fon +t color=red>SSS</font>

Look into this How (Not) To Ask A Question

chargrill++

Regards,
Velusamy R.


eval"print uc\"\\c$_\""for split'','j)@,/6%@0%2,`e@3!-9v2)/@|6%,53!-9@2~j';

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-03-29 00:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found