Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: "not enough arguments" with 'mkdir' command

by Roger (Parson)
on Dec 09, 2003 at 00:57 UTC ( [id://313331]=note: print w/replies, xml ) Need Help??


in reply to "not enough arguments" with 'mkdir' command

You could type perldoc -f mkdir from the command prompt to get the documentation for the 'mkdir' function. And I would also check for the return status of mkdir to see if it has succeeded or not.

Another point is that file masks are octal numbers, so that
mkdir 'dir', 700; # incorrect
is not the samething as
mkdir 'dir', 0700; # correct
Having said that, you can certainly overcome this problem by a subsequent call to 'chmod' -
chmod 'dir', 0700;

Replies are listed 'Best First'.
Re: Re: "not enough arguments" with 'mkdir' command
by nysus (Parson) on Dec 09, 2003 at 01:23 UTC
    OK, after looking at the perldoc, it says nothing about the mask being optional. You are correct. Thanks for this. I was also supplying the mask as a string literal, not an integer.

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff";
    $nysus = $PM . $MCF;
    Click here if you love Perl Monks

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://313331]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (2)
As of 2024-04-25 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found