From:                   [EMAIL PROTECTED]
>  Sorry about not including code. Basically, it is:
> 
> 
> 
>  open(REGION_NAME, "<region_file");   
> 
>  while($region = <REGION_NAME>) {

perldiag says:

    Value of %s can be "0"; test with defined()
        (W misc) In a conditional expression, you used <HANDLE>, 
<*> (glob),
        "each()", or "readdir()" as a boolean value. Each of these
        constructs can return a value of "0"; that would make the
        conditional expression false, which is probably not what you
        intended. When using these constructs in conditional 
expressions,
        test their values with the "defined" operator.


while (defined($region = <REGION_NAME>)) {

You are very unlikely to be bitten by testing for truth instead of for 
definednes in this case. Plus it seems that newer perls know what 
you've meant anyway in this case. My ActivePerl v5.6.1 build 626 
desn't give me the warning no matter what.

Eg. if you change the $/ to 0 and the input contains several zeroes 
in a row then some of the "lines" you read will only contain "0" ... 
which evaluates to false.

Or the last line in the file could contain a zero and not be ended 
with the LF. Then you'd not process that zero and think the file was 
over already.  

Can't think up anything else ...

Jenda


=========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==========
There is a reason for living. There must be. I've seen it somewhere.
It's just that in the mess on my table ... and in my brain.
I can't find it.
                                        --- me

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to