in reply to Failed to create work\\startup directory

if ( -d 'work' && ! -e 'startup' ) { print "create work/startup directory\n"; mkdir 'work/startup' or do { print "create work/startup directory failed because :$!\n"; exit 1; }; }

Replies are listed 'Best First'.
Re^2: Failed to create work\\startup directory
by Anonymous Monk on Apr 24, 2011 at 23:21 UTC

    The thing is directory "work" also needs to be created first and then work/startup.Is the below "if condition" right to check if a directory "work" already exists?

    if ( ! -e 'work' )#Is this condition right? { print "creating work/startup directory\n"; mkdir 'work' or do { print "create install directory failed because :$!\n"; exit 1; }; mkdir 'work/startup' or do { print "create work/startup directory failed because :$!\n"; exit 1; }; }