Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • From the documentation:

    Removes files and directories. Directories are removed recursively like in rm -rf if the first argument is a reference to a scalar that evaluates to true. If the first arguemnt is a reference to a scalar then it is used as the value of the recursive flag. By default it's false so only pass \1 to it.

    Lovely, a magical first value of \1. That must make for some scores of very sad maintainance programmers.

    I've never used File::Remove, and after seeing this, I doubt I ever will.

    • Indeed, I hate it... but hey it works and it's very common.

      I would like to have a go at another module though at some point (although I doubt very much that will happen) that would be a safer delete.

      Prescan the tree and work out if you SHOULD be able to delete it, then do it seperately.