|Pathologically Eclectic Rubbish Lister|
Different behaviour of 'stat' function after assignment to $! (errno).by muxxum (Initiate)
|on May 24, 2011 at 10:39 UTC||Need Help??|
muxxum has asked for the
wisdom of the Perl Monks concerning the following question:
I was wondering if anyone can explain the difference between the outputs of two following programs. The only difference between the programs is that 0 is assigned to $! in the second program.
died at first stat at a.pl line 3.
died at second stat at a.pl line 5.
If 0 is assigned to $! before the first stat, the first failed stat does not set the $!.
I also noticed that if instead of $!=0 we do a undef $!, the program behaves as the first one.Thanks!