Re: Question about example in "Mastering Perl"

2010-03-19 Thread Linux Expert
Of course, I shoulda' seen that. Thanks! On 3/19/10, David Christensen wrote: > Linux Expert wrote: >> if( $!{ENOENT} ) # File doesn't exist >> { >> warn "\tTrying to make directory $dir...\n"; >> mkdir $dir, 0755; >> } >> elsif( $!{ENOSPC} ) # Full disk >> { >> SNIP >> My

Re: Question about example in "Mastering Perl"

2010-03-19 Thread David Christensen
Linux Expert wrote: if( $!{ENOENT} ) # File doesn't exist { warn "\tTrying to make directory $dir...\n"; mkdir $dir, 0755; } elsif( $!{ENOSPC} ) # Full disk { SNIP My question is this: wouldn't the mkdir on line 4 reset the $! value, and also the %! hash if it failed? If s