in reply to Remove Directory

Please RTFM.

From the documentation of unlink:

unlink will not delete directories unless you are superuser and the -U flag is supplied to Perl. Even if these conditions are met, be warned that unlinking a directory can inflict damage on your filesystem. Use rmdir instead.

     "Income tax returns are the most imaginative fiction being written today." -- Herman Wouk

Replies are listed 'Best First'.
Re^2: Remove Directory
by polettix (Vicar) on Jul 20, 2005 at 08:43 UTC
    ... and just continuing along the RTFM line:
    rmdir FILENAME rmdir Deletes the directory specified by FILENAME if that directory is empty. If it succeeds it returns true, otherwise it returns false and sets $! (errno). If FILENAME is omitted, uses $_.

    Flavio
    perl -ple'$_=reverse' <<<ti.xittelop@oivalf

    Don't fool yourself.