in reply to Running a script across multiple directories with multiple output files (problems comparing hash key values)

I may have went in a wrong direction above.

my %input1 = (); #initialize input1 hash for my $c (0..$#AbsFiles){ if ($AbsFiles[$c] =~ /R2_001\.fastq$/){ open INPUT1 ... ; stuff to set ... $input1{$key1} ... close INPUT1; } } # c for my $c (0..$#AbsFiles){ if ($AbsFiles[$c] =~ /R1_001\.fastq$/$/){ open INPUT2 ... ; ...stuff to test key2 against $input1{$key2}; close INPUT2; } } # c
You were resetting the input1 hash every time you opened a file to test for key1.

  • Comment on Re: Running a script across multiple directories with multiple output files (problems comparing hash key values)
  • Download Code