Re: Breaking out of foreach loop

2001-09-02 Thread baby lakshmi
Hi Chris, Use loop breaks such as last, next, goto etc eg @arr=qw(1 3 4 2 4 5); foreach $number(@arr) { last if($number == 2); print "$number"; } HTH Regards Babylakshmi M _ Get your FREE download of MSN Explorer at http://

Re: Breaking out of foreach loop

2001-08-06 Thread Rachel Coleman
> Can someone tell me how I can break out of a foreach loop before the end? Use the 'last' command. See http://www.perldoc.com/perl5.6/pod/func/last.html for an explanation of how to use it. It works for breaking out of any loop e.g. foreach, while, until. Best wishes, Rachel -- To unsu

Re: Breaking out of foreach loop

2001-08-05 Thread Jos I. Boumans
nday, 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 PR

Breaking out of foreach loop

2001-08-05 Thread Webmaster
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]

Breaking out of foreach loop

2001-08-05 Thread CDitty
Sorry if this is a repost. Sent it from wrong address. 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]