Bingo!!
I had that line at the bottom, and no 'last;'!
:) :) :)
Thanks!!!!!!!
Tanton Gibbs wrote:
> Oh, I see what you are trying to do now...sorry.
>
>
>
> $i will always exist...it will range from 0..20.
>
>
>
> Therefore, testing to see if $i exists will always be true (except
> when it is 0).
>
>
>
> You want to test to see if $value[$i] is true, so instead of saying
>
>
>
> if( $i )
>
>
>
> say
>
> if( $value[$i] ) {
>
> ...
>
> }
>
> else {
>
> last;
>
> }
>
>
>
> The last will exit the loop for you.
>
> ----- Original Message -----
>
> * From:* Chris Anderson <mailto:[EMAIL PROTECTED]>
>
> * To:* Tanton Gibbs <mailto:[EMAIL PROTECTED]>
>
> * Cc:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
> * Sent:* Saturday, January 26, 2002 2:46 PM
>
> * Subject:* Re: Trying to get NULL with use strict; - How???
>
>
> This, too, failed to give me what I wanted...
>
> Here is the results I was given in the file:
> Summary:
> 1
> Reproducible:
> 2
>
> Steps to Reproduce:
> 1) 3
> 2) 4
> 3) 5
> 4)
> 5)
> 6)
> 7)
> 8)
> 9)
> 10)
> 11)
> 12)
> 13)
> 14)
> 15)
> 16)
> 17)
> 18)
> 19)
> On the SCREEN, however, it has always worked properly...
> Summary:
> 1
> Reproducible:
> 2
>
> Steps to Reproduce:
> 1) 3
> 2) 4
> 3) 5
>
> If there are no more Items, I want the loop to exit....
>
> :)
>
> Thanks!
>
>
> Tanton Gibbs wrote:
>
>> Sorry, my mistake...you wanted
>>
>> if( $i != NULL )
>>
>> and I gave you
>>
>> if( !$i )
>>
>> when I should have given
>>
>> if( $i )
>>
>> ----- Original Message -----
>>
>> * From:* Chris Anderson <mailto:[EMAIL PROTECTED]>
>>
>> * To:* Tanton Gibbs <mailto:[EMAIL PROTECTED]>
>>
>> * Cc:* [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>>
>> * Sent:* Saturday, January 26, 2002 2:42 PM
>>
>> * Subject:* Re: Trying to get NULL with use strict; - How???
>>
>>
>> This did not work! :(
>>
>> I just replied to Dadivd Wagner's note, with the entire code,
>> which, BTW, is heavily domumented! :)
>>
>> Something I got into the habit of doing back in QB 4.5 days! :)
>>
>> Didn't know that perl did not support NULL! :( :(
>>
>> Anyway, any other suggetions would be greatly appreciated! :)
>>
>> thanks,
>>
>> Chris
>>
>> Tanton Gibbs wrote:
>>
>>>I'm not sure what you want here, but there is no NULL in perl.
>>>
>>>You might mean undef or 0, in which you can just say
>>>if( !$i ) {
>>> ...
>>>}
>>>
>>>HTH,
>>>Tanton
>>>----- Original Message -----
>>>From: "Chris Anderson" <[EMAIL PROTECTED]>
>>>To: <[EMAIL PROTECTED]>
>>>Sent: Saturday, January 26, 2002 12:35 PM
>>>Subject: Trying to get NULL with use strict; - How???
>>>
>>>
>>>>The following code fails:
>>>>
>>>> if ( $i != NULL ) {
>>>> if ($j < 10) {
>>>> print DUMPFILE " $j) ", "$value[$i]\n" ;
>>>> } else {
>>>> print DUMPFILE " $j) ", "$value[$i]\n" ;
>>>> }
>>>> }
>>>>as I have:
>>>>
>>>>use strict;
>>>>
>>>>At the very top.
>>>>
>>>>But I need a way to check and see if the array is empty...
>>>>
>>>>(4 items, but can have 20)
>>>>
>>>>How would I do this???
>>>>
>>>>TIA!
>>>>
>>>>
>>>>--
>>>>
>>>>Chris Anderson
>>>>
>>>>
>>>>
>>>>
>>>>--
>>>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>>>For additional commands, e-mail: [EMAIL PROTECTED]
>>>>
>>>
>>>
>>
>>
>>--
>>
>>Chris Anderson
>>CTO
>>C&P Enterprises
>>http://www.candp-ent.com/
>>
>>
>
>
>--
>
>Chris Anderson
>CTO
>C&P Enterprises
>http://www.candp-ent.com/
>
>
--
Chris Anderson
CTO
C&P Enterprises
http://www.candp-ent.com/