in reply to use of last

why not use a while loop like:
my $x = 'FALSE'; while ( $x ) { $x = 'TRUE'; last if( $x =~ /TRUE/ ); } print 'Script is now outside of while loop and $x is TRUE';
But without seeing more code in which this question was derived from, I am not certain this will be what you need. You may not need a while loop.

Replies are listed 'Best First'.
Re^2: use of last
by Anonymous Monk on Jul 21, 2015 at 00:18 UTC

    why not use a while loop like:

    Why not a simple if statement

    if( ! $true ){ ## skip after "last" ...; }