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.my $x = 'FALSE'; while ( $x ) { $x = 'TRUE'; last if( $x =~ /TRUE/ ); } print 'Script is now outside of while loop and $x is TRUE';
In reply to Re: use of last
by james28909
in thread use of last
by morgon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |