Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The data is in several blocks like this:while (<MYFILE>) #this is my opened file { { next if /^\s*File/; #remove line starting with filename ($id, $seq) = split; push @{$species{$id}}, (split //, $seq); }
what I get printed is the key and then a load of numbers probably relating to where the value is stored rather than the value itself being printed.while (($key, $sequence)=each %species) { print $key,$sequence; print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: newbie hashes question
by Trimbach (Curate) on Jun 05, 2002 at 11:32 UTC |