Hello,
thank u for the very fast reply. I tried the syntax you posted but it doesnt work for me ..for some reason.
my $dev = '/dev';
if (-e $dev && -d _) {
# print "Directory exists \n";
print $dev, ' directory exists.', $/;
}
but If I use
perl -wle '$x=q(/dev); print "OK" if -d $x'
, it works fine from the command line