Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: stat : error handling

by toolic (Bishop)
on Jan 03, 2013 at 13:38 UTC ( #1011450=note: print w/ replies, xml ) Need Help??


in reply to stat : error handling

Try something like this:

use warnings; use strict; my @stats = stat 'foo'; if (@stats) { print "OK\n"; } else { print "Error\n"; }

Also, use <blockquote> instead of quote.


Comment on Re: stat : error handling
Select or Download Code
Re^2: stat : error handling
by gepebril69 (Beadle) on Jan 03, 2013 at 13:51 UTC

    Thanks Toolic

    Have updated the quote to quoteblockquote And your code works! Excellent. I get it.

    Do you have any idea why perlmonks uses a textstyle website with 90's looks? I mean we don't need eyecandy, but maybe some styling would be nicer and more functional.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2015-07-07 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls