examples/rmtree.pl

use strict;
use warnings;

use File::Path qw(rmtree);

my $path = "/path/to/directory";
rmtree $path;