for (1..10) {
last if /3/;
print;
}
you'll notice this printing '12'
so 'last' breaks out of the loop if the condition is met
hth
Jos Boumans
----- Original Message -----
From: "Webmaster" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, August 05, 2001 7:31 PM
Subject: Breaking out of foreach loop
> Can someone tell me how I can break out of a foreach loop before the end?
>
> Thanks
>
> Chris
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]