in reply to Re^2: correlation between two inputt files
in thread correlation between two inputt files

Feel free to contact me to arrange payment...

#!/usr/bin/env perl use Modern::Perl; my @p; open my $fd2, '<', 'INPUT_FILE2.TXT' or die $!; while(<$fd2>){ next if /#/ or ! /\w/; my( $p, $n ) = split; push @{$p[$n]}, $p; } close $fd2; open my $fd1, '<', 'INPUT_FILE1.TXT' or die $!; while(<$fd1>){ next if /#/ or ! /\w/; my( $r, $n ) = split; say "reactant: $r, product: $_" for @{$p[$n]}; } close $fd1;

Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.