perldoc perlvar look for $., start printing if that's >= 33.
| [reply] [d/l] [select] |
<IN> for 1..32;
Then,
while (defined(my $goodstuff = <IN>)) {
# and so on
Substitute your file handle for IN.
Update Extended example.
| [reply] [d/l] [select] |
Basically same as above solutions, but presented as a command-line filter:
perl -ne 'print if $. >= 33'
| [reply] [d/l] |
You could do something like:
{
my $i;
while(<>){$i++;print if $i>32;}
}
You didn't say what you wished to do with the output, but
you could direct the print to a file, etc.
chas
| [reply] [d/l] |
Just skip the first 32 lines:
...
while( <FH> ){
$. <= 32 and next;
...
}
...
| [reply] [d/l] |
#! perl -slw
use strict;
open my $fh, '+<', $ARGV[ 0 ] or die $!;
<$fh> while ($.||0) < 32;
my $bufsize = tell( $fh );
my( $readPoint, $writePoint ) = ( $bufsize, 0 );
my $buffer;
local $/;
while( my $read = read( $fh, $buffer, $bufsize ) ) {
seek $fh, $writePoint, 0;
print $fh $buffer;
$writePoint += $read;
seek $fh, $readPoint+=$read, 0;
}
truncate $fh,$writePoint;
close $fh;
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
The "good enough" maybe good enough for the now, and perfection maybe unobtainable, but that should not preclude us from striving for perfection, when time, circumstance or desire allow.
| [reply] [d/l] |