in reply to Re: Error opening file handle within while loop
in thread Error opening file handle within while loop

HI, thanks for your time. The syntax error was for the line "open (IN2, "m2.gff") or die;" but as was pointed out I was missing a ; on the preceding line. Now I get the error message: Use of uninitialized value $columnsA2 in addition (+) at phastCons_multiples_ids3.pl line 19
  • Comment on Re^2: Error opening file handle within while loop

Replies are listed 'Best First'.
Re^3: Error opening file handle within while loop
by Corion (Patriarch) on Feb 10, 2016 at 12:57 UTC

    I would then look at the values in @columnsA, and/or how @columnsA gets filled.

      $columns (or $columnsA, apologies this is just a discrepancy between versions of the script I'm testing) is filled as I expect if I print the array, however when I try to print a single column as a string it says it is uninitialized - I'm really not sure why this might be.

        Since you are new to coding my guess is because @columnsA (or whatever) has only 2 elements while your code thinks there are three. Arrays are indexed from zero upwards, not from one.