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

This node falls below the community's minimum standard of quality and will not be displayed.
  • Comment on Re^2: correlation between two inputt files

Replies are listed 'Best First'.
Re^3: correlation between two inputt files
by brx (Pilgrim) on Apr 27, 2012 at 14:50 UTC
Re^3: correlation between two inputt files
by aaron_baugher (Curate) on Apr 27, 2012 at 15:17 UTC

    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.

    A reply falls below the community's threshold of quality. You may see it by logging in.