Also, if you are hard coding the path then you need to quote them if
(-d "/home/user"){ if you are using a variable then if (-d $dir){
would work. But its always a good practice to quote
filenames/directories , even if they are variables.



What? You mean like:

        if (-d "$dir") { ...

Why do you think so???

Nothing in particular.. Sometimes I use if(-d $dir/test){
... This fails


So its better to use if(-d "$dir/test") {

No problemo...



Reply via email to