in reply to check if directory exists under windows

Hi kevind0718,

And now that you've got your solution, here's a way to prevent it (or similar) from happening again:

my $outFileDirectory = "./bin"; + if (-d @outFileDirectory ) { print "There is a directory --> " . $outFileDirectory . "\n" ; } else { print "There is a no such directory --> " . $outFileDirectory . " +\n" ; }

seems to fail cryptically, as you've observed:

There is a no such directory --> ./bin

But if you use strict and warnings:

use strict; use warnings; + my $outFileDirectory = "./bin"; + if (-d @outFileDirectory ) { print "There is a directory --> " . $outFileDirectory . "\n" ; } else { print "There is a no such directory --> " . $outFileDirectory . " +\n" ; }

The path to enlightenment is made shorter:

Global symbol "@outFileDirectory" requires explicit package name at x. +pl line 7. Execution of x.pl aborted due to compilation errors.

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/