Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: correlation between two inputt files

by himanshuyadav
on Apr 27, 2012 at 13:03 UTC ( #967626=note: print w/ replies, xml ) Need Help??


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

Dear monk,

thank you for your reply.

can you please code this in perl.I am not a perfectionist programmer in perl.Please help me out.

waiting for your reply.


Comment on Re^2: correlation between two inputt files
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 (Deacon) 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.

      dear sir, great thanks on your reply.I am a B.Sc 1st year student in India.This script is needed for our Biochemistry project. It is giving slightly different result.It will be great if you can look into it and modify it according to desired output. waiting for your reply. Thank you.
        Right after you send me (privately, so I can make a ton of $$$ off it) a cure for cancer.

        That should be right up a BioChem major's alley.

        Alternately, send me a contract assigning to me all your future patents, proceeds of royalty agreements, and salary.

        Since you don't say what you want different about the results, I couldn't modify it if I wanted to. In your sample, you show it outputting the reactants in the order E, C, A, B, and since that doesn't match the order from the file or alphabetical order, I have no idea what you're shooting for there.

        I already did 99% of the work on spec. If you're trying to learn Perl, figuring out the last 1% will be good practice. If you're not interested in learning Perl, and just need a script written for your classroom, then again, I (and others here, I'm sure) will be glad to offer you a quote for the work.

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://967626]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (10)
As of 2014-11-24 16:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (143 votes), past polls