in reply to Re^5: $_ not set in while <>
in thread $_ not set in while <>
I suspect that something very simple like this would work:
use strict; use warnings; my $pattern ='ABC'; while (<>) { last if /$pattern/; } # processing of rest of file starts here... print "printing all lines after $pattern detected!\n"; while (<>) { print; }
|
|---|