in reply to While loop does not terminate
Sorry, I can't reproduce this; if get_value() returns 'initializing', then the loop terminates immediately.
use warnings; use strict; my $cnt; sub get_value { $cnt++ < 10 ? 'initializing' : 'ok' } my $status; while( !( ($status = get_value()) eq 'initializing' ) ) { print "X" } print "Y\n";
Just prints one Y.
Edit: This was posted before the root node was updated, see my reply here.
|
|---|