Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Opening filenames with special characters

by whereiskurt (Friar)
on Mar 12, 2007 at 19:49 UTC ( #604420=note: print w/ replies, xml ) Need Help??


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


Comment on Re: Opening filenames with special characters
Download Code
Re^2: Opening filenames with special characters
by TheDamian (Priest) 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.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://604420]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2014-09-18 22:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (125 votes), past polls