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.

Replies are listed 'Best First'.
Re^2: stat : error handling
by gepebril69 (Scribe) 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.