Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The output is# @pair contains all the keys. my @pair = $pair; my @value = $value; %hash = map {$pair[$_] => $value[$_]} 0..$#pair; while (($key, $value) = each (%hash)) { if ($key eq 'TG') { $TG_score = $value; } print "The value of $key is:$value"; }
I want it to be;The value of TG AT CG is: 3 2 2
etcThe value of TG is:3
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: hashes - treating all keys/ values as one
by tachyon (Chancellor) on Feb 27, 2003 at 12:24 UTC | |
|
Re: hashes - treating all keys/ values as one
by Abigail-II (Bishop) on Feb 27, 2003 at 12:22 UTC | |
|
Re: hashes - treating all keys/ values as one
by hardburn (Abbot) on Feb 27, 2003 at 15:06 UTC | |
|
Re: hashes - treating all keys/ values as one
by OM_Zen (Scribe) on Feb 27, 2003 at 15:48 UTC |