On 10-11-21 04:56 AM, addie wrote:
#!/usr/bin/
perl
\

use strict;
use warnings;

my %hash = ();
my $key = '';
open ACCESSIONS, "fix.txt" or die "Can't open fix.txt: $!\n";
while (my $locus_line =<ACCESSIONS>){
#This is supposed to populate
%hash.
     %hash = split(/\s/, $locus_line);
     foreach my $k (keys %hash) {
#       print "$k $accesshash{$k}
\n";
}
}
close ACCESSIONS;
open INKEYS, "in.txt" or die "Can't open in.txt: $!\n";
while (my $x =<INKEYS>){
#var is the key whose value I will want to grab for use later in the
program.
   $key =  $x;
   chomp($key);
#Some debug lines to check the output by Alex
Batko
   print "Value EXISTS, but may be undefined.\n" if exists
$hash{$key};
   print "Value is DEFINED, but may be false.\n" if defined
$hash{$key};
   print "Value is TRUE at hash key $var.\n"     if
$hash{$key};

Where did $var come from?


print "$key ";
   print  $hash{$var};
   print "\n";
}

print "\n" .  $hash{$var};
print "\n";

close INKEYS;



--
Just my 0.00000002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to