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 ( #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 musing on the Monastery: (11)
As of 2014-08-27 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls