I think it'll be faster since once you pass the 32nd line, you don't need to check anymore, you can just dump out the rest of the file. Note that $. might not do what you expect, depending on the value of $/. See perlvar.perl -i.bak -ne 'if ($. < 32) { print } elsif ($. > 32) { print <>}' f +ilename
-- Dan
In reply to Re: Save all but line 32!
by zigdon
in thread Save all but line 32!
by bronto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |