Perl: the Markov chain saw | |
PerlMonks |
Re: open failure codeby tachyon (Chancellor) |
on Nov 26, 2003 at 23:17 UTC ( [id://310408]=note: print w/replies, xml ) | Need Help?? |
Precedence and operator binding is the issue. But...why not just.....
Note the error code (string reason) is set in $! if open, print, close, mkdir, unlink.....fail. Internal Perl functions return 1 if they succeed, 0 or undef if they fail. If you want to do the || $scalar = 'blah' you can do this:
cheers tachyon
In Section
Seekers of Perl Wisdom
|
|