Nyyr has asked for the wisdom of the Perl Monks concerning the following question:
How does PERL resp. PRINT FILEHANDLE function report such error? Does it return FALSE or UNDEF or does it throw an exception which has to be handled by:open(my $filehandle, '>', 'C:\TEST.txt'); <--- OK print $filehandle "AAA\n"; <--- OK print $filehandle "BBB\n"; <--- OK print $filehandle "CCC\n"; <--- disk write error
??? Thanks :-)eval { print $filehandle ....... } if ($@) { error hnadling }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Detecting write errors (disk full, bad media)
by Corion (Patriarch) on Jun 30, 2011 at 14:43 UTC | |
by bart (Canon) on Jul 01, 2011 at 12:39 UTC | |
by oxone (Friar) on Jul 03, 2011 at 09:16 UTC | |
Re: Detecting write errors (disk full, bad media)
by kennethk (Abbot) on Jun 30, 2011 at 14:45 UTC | |
Re: Detecting write errors (disk full, bad media)
by toolic (Bishop) on Jun 30, 2011 at 15:00 UTC | |
by Anonymous Monk on Jun 30, 2011 at 15:20 UTC | |
Re: Detecting write errors (disk full, bad media)
by ikegami (Patriarch) on Jun 30, 2011 at 17:03 UTC | |
Re: Detecting write errors (disk full, bad media)
by aanriot (Sexton) on Jun 30, 2011 at 15:17 UTC | |
Re: Detecting write errors (disk full, bad media)
by dcmertens (Scribe) on Jul 01, 2011 at 16:26 UTC |