in reply to Reading 60k lines in file
Also add checks for your implied assumptions: does the split succeed and return 5 elements; what's with the open and the 2 gd operations in case of errors?
An example: for the split, you could use a more readable version of e.g. @h=split(/.../, $line) and $#h>=4 or do {warn "illegal line: $line"; next} to bail out on questionable input.
Also of interest for you: is it always the same line / file creating the problem? Missing or bad image file, ....? Which may make one of the gd calls die. Test returns before continue to use them. Try wrapping in eval{} and then testing $@ (e.g. do{warn ...; next} if $@)on calls that can die and warn/skip for the problem line.
HTH, Peter
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading 60k lines in file
by b_gsmls (Initiate) on Oct 08, 2009 at 16:24 UTC | |
by jakobi (Pilgrim) on Oct 08, 2009 at 16:35 UTC | |
by b_gsmls (Initiate) on Oct 08, 2009 at 17:10 UTC |