in reply to Re^2: Automatic type conversion in a sub parameter causing a problem
in thread Automatic type conversion in a sub parameter causing a problem

Could you try the builtin mkdir instead as a test? Although you're setting permissions as you create, chmod might be worth a look too.

  • Comment on Re^3: Automatic type conversion in a sub parameter causing a problem

Replies are listed 'Best First'.
Re^4: Automatic type conversion in a sub parameter causing a problem
by davebock (Initiate) on Oct 22, 2015 at 17:48 UTC

    Yes, I did try mkdir at the first iteration. Same problem. The issue seems to be that the value being passed into the sub "looks" different inside the sub depending on how the sub was called. Please see the sample calls and output.

Re^4: Automatic type conversion in a sub parameter causing a problem
by davebock (Initiate) on Oct 22, 2015 at 17:51 UTC

    Mistake: My real File::Path module is version '2.08'.

      After my changes, I used the $dirMode test successfully, by calling the script as such: ./dir.pl -d steve -m 0777. My File::Path is v2.09.