use warnings;
chdir "D:\\myperl";
unlink glob "* .*";
rmdir "D:\\myperl";
who can tell me why the codes above does not work?
there is no directory under "D:\\myperl".
which is the right way to remove a directory?
...全文
962打赏收藏
删除空目录perl
use warnings; chdir "D:\\myperl"; unlink glob "* .*"; rmdir "D:\\myperl"; who can tell me why the codes above does not work? there is no directory under "D:\\myperl". which is the right way to remove a directory?
when you have executed unlink glob "* .*";
now your current work directory is D:\\myperl, it is running,you can change current work directory to others,so that you can execute rmdir "D:\\myperl"; .
you can try it. good luck!