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

It still does not work for me. The existence of the extraneous variables is because I have been experimenting with moving the oct() around and add things like $mode . " " or $mode + 0 to see if I can affect the value. I am starting to suspect that I have an old, and buggy, module somewhere. I am unable to update my modules at all, short of hand typing them myself and putting them locally. My File::Path module is version 5.005_04

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

Replies are listed 'Best First'.
Re^3: Automatic type conversion in a sub parameter causing a problem
by stevieb (Canon) on Oct 22, 2015 at 17:43 UTC

    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.

      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.

      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.