Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: coloring patterns of an array

by Samy_rio (Vicar)
on Feb 05, 2007 at 05:51 UTC ( #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';


Comment on Re: coloring patterns of an array
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2015-07-07 02:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls