http://www.perlmonks.org?node_id=604420


in reply to Opening filenames with special characters

I've started to using this pragma at the top of my scripts:
use Fatal qw( open close );
Basically the functions listed will now throw exceptions when they fail (use eval {}), instead of setting failure values and returning false. Fatal is part of the standard Perl modules. I learned this in 'Perl Best Practices' -- best book ever. Damian Conway, if you ever read this, I love you in a purely technosexual way. :) KPH

Replies are listed 'Best First'.
Re^2: Opening filenames with special characters
by TheDamian (Vicar) on Mar 12, 2007 at 21:34 UTC
    use 6; return all('thanks', 'appreciation') but ETOOMUCHINFO;

    ;-)

Re^2: Opening filenames with special characters
by diotalevi (Canon) on Mar 12, 2007 at 23:24 UTC

    If you're checking for failure on close() because you write to stuff, you ought to be checking for failure on write as well. Typically that might be print() or die.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊