in reply to Phantom directories created using mkdir

Something else is happening in your code that isn't demonstrated here, the only way you could get a directory named '$scalar' is if either you used single quotes when creating $dir_name, preventing the variable from getting interpolated, or the variable $scalar contains the word $scalar. If $scalar were simply empty, the code you have here would be checking /path/ and not creating the directory.

If this is a unix machine you should be able to remove that directory by using rm ./\$scalar, or perl -e "unlink('$scalar');"

Replies are listed 'Best First'.
Re: Re: Phantom directories created using mkdir
by jonnyfolk (Vicar) on Feb 19, 2003 at 17:01 UTC
    I'm sorry - I've obviously been more than usually obtuse in the phrasing of this question.

    when I wrote that the directory is named $scalar I meant that the scalar $scalar had interpolated properly and had been given its correct name. Thus if $scalar=1000 , the directory would be found at /path/1000

    As for deleting the 'phantom' directories - the problem is that the (Unix) server states that they don't exist! I can see them via my ftp client.