in reply to Re: Reading 60k lines in file
in thread Reading 60k lines in file

i'm giving this a whirl ,thanks much ikegami, I obviously could have written it better from the start. I am a bit unclear on the if statement so I'll need to do some reading..

Replies are listed 'Best First'.
Re^3: Reading 60k lines in file
by ikegami (Patriarch) on Oct 08, 2009 at 21:15 UTC
    if (!( print($out_fh $gd->jpeg()) and close($out_fh) )) { warn("Error writing file \"$out_qfn\": $!. Skipping\n"); close($out_fh); unlink($out_qfn); next; }
    means
    if (!print($out_fh $gd->jpeg())) { warn("Error writing file \"$out_qfn\": $!. Skipping\n"); close($out_fh); unlink($out_qfn); next; } if (!close($out_fh)) { warn("Error writing file \"$out_qfn\": $!. Skipping\n"); close($out_fh); # Useless unlink($out_qfn); next; }