pabla23 has asked for the wisdom of the Perl Monks concerning the following question:
When the compiler enter into the second while the variable "test2" is not seen! I try to "play"with the declaration global/local...but the result is the same! Can someone help me?use strict; use warnings; use Data::Dumper; open (FILE, "/Users/Pabli/Desktop/gene_association.goa_human"); open (FILE2, "/Users/Pabli/Desktop/go3.obo"); while(<FILE>) { my @array_with_all_fields=split(/\t/); if ($array_with_all_fields[2] eq "TP53"){ my $mio=$array_with_all_fields[4]; my %go_accession_hash=($mio,''); my @test2= keys %go_accession_hash; } } while(<FILE2>){ print "".$test2[0]."\n"; } close FILE; close FILE2;
Thanks Paola
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem of context?
by hippo (Archbishop) on Oct 16, 2014 at 08:37 UTC | |
by pabla23 (Novice) on Oct 16, 2014 at 09:53 UTC | |
by choroba (Cardinal) on Oct 16, 2014 at 09:55 UTC | |
by biohisham (Priest) on Oct 16, 2014 at 13:44 UTC | |
by pabla23 (Novice) on Oct 16, 2014 at 15:30 UTC | |
by Anonymous Monk on Oct 16, 2014 at 21:35 UTC | |
|
Re: Problem of context?
by roboticus (Chancellor) on Oct 16, 2014 at 13:53 UTC |