in reply to Re^3: why did i die?in thread why did i die?
The $! will only be set when the die() is related to a failing operating system call (for instance open()). That does not work in cases like:
defined $filename or die "no filename given"; [download]