in reply to mkdir die

I posted this on of the duplicate copies of this node but it got reaped so here it is again. As blakem pointed out, it's a matter of operator precedence. This gets interpreted as mkdir $DIR_LOCATION, (0777 || die "sigh"); Use parens on your mkdir call:
eval { mkdir ($DIR_LOCATION, 0777) || die "sigh"; }; if ($@) { print "Never gets here to display error message."; }
blakem's solution works too since or has lower precedence than || but I personally prefer parens and ||. Either way works fine -- do whicher you like better. --RT