It works fine for me.  I am running Activestate 5.6.1 b633 on XP

here's an example of creating a recursive directory structure:

    my @path     = split "/", "${logDir}/$logName";
    pop @path;    # get rid of the filename.
    my $concatenatedPath;

        foreach my $pathSegment( @path )
        {
            $concatenatedPath .= "$pathSegment/";
            if(!-w "$concatenatedPath"){
                if( mkdir("$concatenatedPath", 777) ){
                    print "path - $concatenatedPath made\n";
                }
                else{
                    print "could not create $concatenatedPath\n";
                }
            }
        }



"Tom McKellips" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> How do I make mkdir work with a variable? I can put
> mkdir '/mydir'; in a cgiscript and it will work perfect every time but if
I
> use a variable
> mkdir $mydir; it will never work
> It does not appear to make any difference how I place " or ' or anything
> else. I have tested the variable to make sure it contains the info I want
> using the print statement and it is correct every time. It just will not
> create a directory I even set the parent directory to 777 still with no
luck.
> Any suggestions?
>
> Thanks
> Tom
>
> --
> Internet Service Provided By Abyss Communications
> A leader in Dial up and Satellite Internet Access
> 1-866-842-2977



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to