while(<DATA>){ if (/2/){ my $skip=2; print "skipping $skip lines\n"; <DATA> while $skip-- >0 and not eof DATA; next; } if (/5/){ print "high five\n"; next; } if (/3/){ print "I am not here\n"; next; } print; } __DATA__ 1 1 2 3 4 4 5
print+qq(\L@{[ref\&@]}@{['@'x7^'!#2/"!4']});
In reply to Re^2: Need to skip two lines
by codeacrobat
in thread Need to skip two lines
by drodinthe559
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |