in reply to Problem with make_path in File::Path

Keep reading the doc for File::Path:
The function returns the list of directories actually created during the call; in scalar context the number of directories created.
If make_path makes a directory which didn't already exist, it returns 1, which means the die is not executed.

If make_path does not need to make a directory because it already exists, it returns undef, which means the die is executed. But, you do not want it to die because you are emulating 'mkdir -p'.

Just use:

make_path $path;

Or, use error => \$err as specified in the docs.