Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: extracting all possible n-mers from an array

by teamster_jr (Curate)
on Jun 08, 2006 at 13:20 UTC ( [id://554272]=note: print w/replies, xml ) Need Help??


in reply to Re: extracting all possible n-mers from an array
in thread extracting all possible n-mers from an array

for some reason i immediately thought of colour pallettes.
not the nicest code, but something i knocked up quickly using your algorithm:
my $c; my $cols={map{(chr(65+$c++),sprintf "%02x",$_)}(0, 51, 102, 153, 204, + 255)}; my @letters=qw/A B C D E F/; print "<html><body><table border=1><tr>"; $c=0; for(glob "{@{[ join ',', @letters ]}}" x 3){ s#.#$cols->{$&}#eg; print "<td bgcolor='#$_'>&nbsp;</td>\n"; print "</tr><tr>" if !(++$c %9); }; print "</tr></table></body></html>";

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-03-29 10:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found