On Wed, May 1, 2013 at 9:22 AM, Manfred Lotz <manfred.l...@arcor.de> wrote:

> have a script where I log stuff to a file and the same time displays
> it to stdout using Log4perl.
>

If you use the autodie perldoc example code:
          eval {
               close($fh);

           };
>               if ($@ and $@->isa('autodie::exception')) {
               if ($@->matches('open')) { print "Error from open\n";   }
               if ($@->matches(':io' )) { print "Non-open, IO error.\n"; }
           } elsif ($@) {
               # A non-autodie exception.
           }

You see that $fh is already closed - gets:
Non-open, IO error.

-- 

a

Andy Bach,
afb...@gmail.com
608 658-1890 cell
608 261-5738 wk

Reply via email to