in reply to probably stupid mistake

Since you didn't show us any of your input, we can not reproduce your problem very easily (if at all). Please add a few relevant lines of your input files.

Replies are listed 'Best First'.
Re^2: probably stupid mistake
by gogoglou (Beadle) on Apr 01, 2011 at 13:52 UTC

    oh sorry, well the contents of the first file looks like this (its going to be larger, not that it should matter):

    GRB2 AFF4 GGGB C7orf42

    and of the second file like these

    KEGG_PATHWAY hsa04722:Neurotrophin signaling pathway 33 0.147 +86271171251902 4,04E+09 GRB2, CAMK2G, NFKB1, MAPKAPK2, MAGED1, +KRAS, MAP3K3, MAP3K1, BCL2, RAC1, GAB1, RHOA, CAMK2D, SH2B3, NGFRAP1, + SHC1, MAP2K7, FRS2, PIK3R1, IRS2, RELA, YWHAB, YWHAE, TP73, NRAS, MA +PK1, CRKL, JUN, NTRK2, CALM3, MAPK9, SORT1, RAP1A 575 124 50 +85 2.353.506.311.360.440 6,83E+11 6,83E+11 0.004929324234 +03758 KEGG_PATHWAY hsa05200:Pathways in cancer 63 0.2822833587239 + 1,86E+10 FGF18, FGF5, PPARD, FGF9, NFKB1, FGF13, PTEN, CCNE2, AC +VR1B, MAX, CDKN2B, RHOA, RALB, RALA, FAS, TPR, CHUK, RELA, RXRA, LEF1 +, CDK6, RB1, STK4, DAPK1, JUP, MAPK1, CCDC6, CRKL, HIF1A, NCOA4, JUN, + VEGFA, MAPK9, TRAF1, WNT5A, APC2, XIAP, GRB2, IGF1R, KRAS, ITGAV, BC +L2, RAC1, RUNX1, PIK3R1, APC, CEBPA, COL4A4, FZD8, COL4A1, IL8, VHL, +CREBBP, TGFBR2, SMAD2, FZD5, STAT3, NRAS, RASSF5, CDKN1B, ITGA6, RASS +F1, JAK1 575 328 5085 16.985.949.098.621.400 0.0031423 +34832759053 0.0010485440045103767 0.02269450903600312 KEGG_PATHWAY hsa04310:Wnt signaling pathway 35 0.156824088179 +94445 4,76E+10 WNT5A, PPARD, APC2, PPP2R5A, CAMK2G, PPP2R5C, PP +P3R1, RAC1, NFAT5, PPP3CB, RHOA, CAMK2D, FRAT2, PRKACA, CHP, PLCB1, F +BXW11, APC, FZD8, VANGL1, NLK, VANGL2, CREBBP, LEF1, SMAD2, FZD5, SEN +P2, SFRP5, SFRP1, CCND2, CSNK1E, JUN, MAPK9, SIAH1, PPP2R5E 575 + 151 5085 20.498.128.419.234.000 0.008008272140318184 0.0 +02008108692225119 0.05796850410908494
      When I run your code using your 2 input files, I get the following output:
      success success
      You need to describe in much more detail what problem you are having.
        Yes, Your code works properly for me too.

        the problem I am having is that although I also want to get success success (or basically instead of printing that to print $fields1 and $line2 if the if statement is true), I am not getting anything at all