Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Opening filenames with special characters

by whereiskurt (Friar)
on Mar 12, 2007 at 19:49 UTC ( [id://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

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.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2024-04-24 17:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found