Dan,
What do you think about the following?
while (1) {
if ($status ==1) {
sub();
last;
}
if ($status ==1) {
sub1();
last;
}
}
Regards,
Ahmed
Daniel Falkenberg wrote:
>Ahmed,
>
>For arguments sake we will say yes! So I presume I will do sub($status)
>? Also we will say that sub() does break the loop but will return where
>it left off after the sub sub() and sub2() has finished what it is
>doing?
>
>Cheers,
>
>Dan
>
>-----Original Message-----
>From: Ahmed Moustafa [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, 5 December 2001 3:27 PM
>To: Daniel Falkenberg
>Cc: [EMAIL PROTECTED]
>Subject: Re: Simpler....
>
>
>Dan, does sub() changes the value of $status? Also, do sub() and sub2()
>break the loop?
>
>Daniel Falkenberg wrote:
>
>>Hey all,
>>
>>Please don't stree to much over this one but, is there an easier way
>>
>of
>
>>writing this?
>>
>>while(1){
>> if ($status == 1) {
>> #Do this sub...
>> sub();
>> elsif ($status == 1) {
>> #Do this other sub...
>> sub2();
>> } else {
>> #Continue while loop...
>> }
>>}
>>
>>Can I make it smaller. I want to know this to improve my Perl skills.
>>
>>Regards,
>>
>>Dan
>>
>
--
Ahmed
[EMAIL PROTECTED] | http://arbornet.org/~ahmed