http://www.perlmonks.org?node_id=525583


in reply to Re: Flipin good, or a total flop?
in thread Flipin good, or a total flop?

If you're really interested on whether the start condition and/or end condition were triggered, there's another way: using variables to capture the test results. Like this:
if((my $start = /start/) .. (my $end = /end/)) { ...
Later, you simply have to test the boolean value of $start and $end:
print "First time\n" if $start; print "Last time\n" if $end;
but only in the if BLOCK, of course (lexical scope for the variables).