in reply to Problem with make_path in File::Path

Let's assume the simplest case - you run the make_path call with the same parameters twice in a row. Assume that the first time the $path does not exist. The second time, since the $path already exists, the function returns a value of (), which is false, triggering the die.

See the documentation for File::Path for more details.

Update: Change the return value from 0 to ()

--MidLifeXis

Replies are listed 'Best First'.
Re^2: Problem with make_path in File::Path
by Anonymous Monk on Jul 20, 2012 at 17:20 UTC

    ***argh***

    I'll admit it is implicit in "...in scalar context (the function returns) the number of directories created", but there is no way I would have got it without your help! Reading between the lines that way presupposes much more experience with Perl.