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

Wow, that was obvious! Apologies for missing such a mistake, and thanks for your answer.

OUT1 is re-opened just to clear it's contents, then it is re-filled with the next section of the file I need to analyse. I'm not sure this is the best way of doing this, but it seems to work.

Now I've added that missing ;, I'm getting an error message: Use of uninitialized value $columnsA2 in addition (+) at phastCons_multiples_ids3.pl line 19

I'm not sure why this is, it's declared within the first if statement?
  • 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 rjc33 (Sexton) on Feb 10, 2016 at 12:58 UTC
    Also, apologies but ignore that it says $columnsA, just a discrepancy between the script I'm currently testing and the one I've posted here.

      Presumably you fixed this error also

      my $mafBlock = qx(maf_parse --start $start --end $end $maf); print OUT1 "$mafBlock1\n"; # << should be $maxBlock
      poj
        Hi, yes well spotted and apologies, this has been fixed. My original code contained slightly different variable names and I changed them to post here to try and simplify things, seems I made a bigger problem though by creating mistakes!