Skip to content

Instantly share code, notes, and snippets.

Created May 3, 2013 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5511062 to your computer and use it in GitHub Desktop.
Save anonymous/5511062 to your computer and use it in GitHub Desktop.
blosum62
my @lines = "blosum.dat".IO.lines;
my @columns = @lines.shift.comb(/\S/);
my %M;
for @lines -> $line {
my @cells = $line.comb(/\S+/);
my $header = @cells.shift;
for @cells.kv -> $k, $v {
%M{@columns[$k]}{$header} = $v;
}
}
say %M<A><Q>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment