- or download this
my $i = 0;
while (<FILE>) {
next if ++$i % 2;
print;
}
- or download this
while (<FILE>) {
next if $. % 2;
print;
}
- or download this
my $toggle = 0;
while (<FILE>) {
next if $toggle ^= 1;
print;
}
- or download this
for (;;) {
last if not defined (my $line1 = <FILE>);
...
print($line1, $line2);
}