in reply to Reading files, skipping very long lines...
I am uncertain whether I see what you mean. Just as an idea, would the following do what you want?
cat file | perl -le '$max=79; while(<>){print unless lentgh $_ > $max}'
If this would work for you, except from the memory issue, write the while loop properly with open first...
if that still fails, consider using Tie::File.
Cheers, Sören
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading files, skipping very long lines...
by Limbic~Region (Chancellor) on Sep 29, 2005 at 17:14 UTC |