Reference

Util::Cmd(3pm)

Util::Cmd - Additional Unix Commands needed by SC

  use Util::Cmd qw(:all);
  my $grubpath = which('grub');
  deltree("/tmp/file1");
  deltree("/tmp/directory");
  mkpath("/tmp/tmp2/tmp3");

Exports which(), deltree() and mkpath() functions. which takes an executable and returns the path to it. deltree recursively deletes files and directories given a list of such files and directories. Note: deltree does not recognize shell metacharacters such as "*" and "?" so if you want do send it a list of files use something like: deltree(glob("files*")); mkpath takes a directory and creates it, along with all the intermediate directories as needed. Acts exactly like "mkdir -p".
EXPORT None by default. With the :all specification which, deltree, and mkpath are exported.

  Sean Dague <[email protected]>
  Vasilios Hoffman <[email protected]>

perl.