in reply to Reading 60k lines in file

Try
while (my $line = <MYINPUTFILE>){ ... }
foreach $line (@lines){ ... }
is probably trying to read the whole file into @lines and _then_ loop over it. The while will read one line at a time.

Update
Better, check that $h[3] and $h[4] actually contain what you think they do.

Replies are listed 'Best First'.
Re^2: Reading 60k lines in file
by b_gsmls (Initiate) on Oct 08, 2009 at 16:18 UTC
    They do. I was printing them out to verify. The program does work for several thousand lines, then breaks at Image::Resize->new($line). which is line 54
    04
    1219504.jpg
    /imagedb/highres/04/1219504.jpg
    /imagedb/thumb/04/1219504.jpg
    /imagedb/thumb/04