On Tuesday 13 Apr 2010 11:17:12 Magne Sandøy wrote: [SNIP] > > Hi again. > > Does this mean this is a bug?
It's not a bug - this is how it works. > My point is to get "z" at the end. Using "eq" or lt" wont work. You need to evaluate the condition at the end of the loop instead of at the beginning. Try doing something like that (tested): {{{ #!/usr/bin/perl use warnings; use strict; sub process_letter { my $letter = shift; print "$letter\n"; } my $letter = "u"; LETTERS_LOOP: while (1) { process_letter($letter); if ($letter eq "z") { last LETTERS_LOOP; } } continue { $letter++; } }}} It's a bit ugly and I've erred a bit on using pseudo-Hungarian Notation ( see http://en.wikipedia.org/wiki/Hungarian_notation ) - for the sake of the demonstration, but it works. Hope it helps. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Original Riddles - http://www.shlomifish.org/puzzles/ Deletionists delete Wikipedia articles that they consider lame. Chuck Norris deletes deletionists whom he considers lame. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/