Loan Tran wrote:

> mkdir ("/storage/systbl/") || die "$!\n";
> 
> The code above does not check if the dir exist.
> Can you modify it please. Thanks.
> 

try:

#!/usr/bin/perl -w
use strict;
use File::Path;

my $dir = '/a/long/not/existing/dir';

mkpath($dir) || die "no permission to $dir?";

print "done\n" if(-e $dir); #-- ok, i don't really need that :-)

__END__

david


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

Reply via email to