in reply to Re^2: stat : error handling
in thread stat : error handling

The solution was $! and, as Athanasius points out, die had nothing to do with it other than to illustrate that the variable is available ;-)

Cheers,

JohnGG