Hello.

I would like to detect an open error when using an anonymous handler by 
designating the undefined scalar variable to open function.

How do I do?

This is a snip of code.
----------
open(my $fh, "non-exist-file");
unless (defined $fh) {
        print "cannot open the file";
        return;
}
----------

Best,
 Takushi.

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to