in reply to getting a while loop to terminate
It's because you have set $flag to '0', which is an uninterpolated string containing the character '0', a true value.
Instead, you should set $flag to zero, (0), without the single quotes. This will evaluate to false and make your logic all happy.
What can be asserted without proof can be dismissed without proof. - Christopher Hitchens, 1949-2011
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: getting a while loop to terminate
by Anonymous Monk on Apr 15, 2012 at 04:20 UTC | |
by Aldebaran (Curate) on Apr 18, 2012 at 04:28 UTC | |
by Anonymous Monk on Apr 18, 2012 at 04:38 UTC | |
Re^2: getting a while loop to terminate
by Aldebaran (Curate) on Apr 17, 2012 at 16:41 UTC | |
by GrandFather (Saint) on Apr 18, 2012 at 01:18 UTC |
In Section
Seekers of Perl Wisdom