From: Harry Putnam <[EMAIL PROTECTED]>
> I wasn't able to really understand perldoc -f warn.
>
> I'm doing
> use File::Find;
> open(FILE,"<$File::Find::name")or warn "blah blah: $!";
>
> Two things I'm unsure of:
>
> 1) is the `: $!' meaningfull here?
> 2) do I need a `next;' following to make `
"Wiggins d'Anconia" <[EMAIL PROTECTED]> writes:
[...]
> if you don't mind dieing, or I often prefer using 'unless' then I
> don't need to worry about a dangling else, so similar to what you have
> above,
In this case I do.
>
> unless (open(FILE, "<$file")) {
>warn "Failed open: $!";
>re
Harry Putnam wrote:
"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
"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 h
Harry Putnam wrote:
>
> I wasn't able to really understand perldoc -f warn.
>
> I'm doing
> use File::Find;
> open(FILE,"<$File::Find::name")or warn "blah blah: $!";
>
> Two things I'm unsure of:
>
> 1) is the `: $!' meaningfull here?
Yes.
> 2) do I need a `next;' following to make `File::Fi
I wasn't able to really understand perldoc -f warn.
I'm doing
use File::Find;
open(FILE,"<$File::Find::name")or warn "blah blah: $!";
Two things I'm unsure of:
1) is the `: $!' meaningfull here?
2) do I need a `next;' following to make `File::Find' go on to the next
found file?
If so, how do I