Here's a simple version...
$a = 5;
while ($a) {
foreach (1..10) {
if ($_ == $a) {
$exit++;
}
}
last if ($exit);
}
print "\$a is $a\n";
R
At 20:20 27/09/2002 -0700, Michael Kelly wrote:
>On Fri, Sep 27, 2002 at 08:29:53PM -0500, Grant Hansen wrote:
On Fri, Sep 27, 2002 at 08:29:53PM -0500, Grant Hansen wrote:
> Can anyone provide an example of how to use a state variable to break out of a
> loop?
>
> Thanks
I smell homework.
But to be fair: what do you have so far? Why doesn't it do what you want?
If you showed us your code where you wer
Grant Hansen wrote:
>
> Can anyone provide an example of how to use a state variable to break out of a
> loop?
Can you provide an example or explanation of what you are trying to do?
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,