in reply to Re: Exiting a loop trickery
in thread Exiting a loop trickery

Or, to avoid nesting loops, use a range operator:
while (<DATA>) { if (/trigger/ .. /timestamp/) { if ( $_ =~ /timestamp/ ) { print "Found timestamp\n"; last; } } }

The PerlMonk tr/// Advocate