"John W. Krahn" <[EMAIL PROTECTED]> writes:

>> If so, how do I let the `next' know that open has failed?
>> That is, how do I test exit status of open function?
>
> open() returns true on success and undef (false) when it fails.
>
>
>> Is it just as
>> in shell programing ($?)?
>
> No.

ok, then how is it done syntacticly.  Wrapping the open in an
`if',  I guess would be one way. 

  if(open(FILE,"<$file")){
       do a string of things;
  }else{
     issue warning message;
     return;
  }

Above would be one test for undefinedness...

 But what if for one reason or
another I wanted to just test to see if the open() had failed. 

What would that sort of test look like?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to