|
Deleting Directories:
rmdir (DIRECTORY)
|
DIRECTORY = Full path to the directory you want removed
|
Example:
#!/usr/bin/perl
$dir = "/path/to/new"
deleteDir();
sub deleteDir {
rmdir($dir) or "Error deleting directory ($dir)\n";
exit();
}
Take note that the dir you are trying to remove must be empty! Otherwise an error will be produced.
|