in reply to mkdir die

(Original reply went to a duplicate node)

Use 'or' rather than '||'. The precedence of 'or' is much lower, so everything to the left of it will be evaluated, rather than the first expression directly to the left. Explicitly parenthesized, your command looks like this:
mkdir $DIR_LOCATION, (0777 || die "sigh");
Which evaluates to
mkdir $DIR_LOCATION, 0777;
Using 'or', it's like this:
(mkdir $DIR_LOCATION, 0777) or (die "sigh");
The entire mkdir() expression is evaluated.

-Matt