use warnings; use strict; my $i = 0; while (foo($i)) { print "i = $i\n"; $i++; } sub foo { my $x = shift; return ($x < 5) ? 1 : 0; } __END__ i = 0 i = 1 i = 2 i = 3 i = 4
In reply to Re: User defined function in while loop
by toolic
in thread User defined function in while loop
by kgherman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |