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

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

Replies are listed 'Best First'.
Re^4: Error opening file handle within while loop
by rjc33 (Sexton) on Feb 10, 2016 at 13:08 UTC
    $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.

        This is a good suggestion, but there should be 7 elements in the array (or 0-6).