in reply to Stat function returning an empty list
I'm a little surprised that the stat docs don't mention this, but the $! variable contains the error. Which in your case would most likely be "No such file or directory". So you could say something like if(!@data) { warn "stat $_ failed: $!" } else { ... }
|
|---|