in reply to Hash/file --> doesn't seem to work
After the first time through, you're at the end of FILE, so the while() is never entered (i.e., it gets EOF right off). Try using seek.
However, it will probably more efficient (if the file is rather small relative to available memory anyway) to load in the data and then iterate over it pre-parsed, than to re-parse the file and each line every time.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hash/file --> doesn't seem to work
by perldesire (Scribe) on Jun 10, 2009 at 07:34 UTC |