http://qs321.pair.com?node_id=753770


in reply to Unlink files but not in pwd

With recent versions of File::Path you can do the following:

use File::Path 'remove_path'; remove_path("/path/of/dir", {keep_root => 1});

This will remove everything in the directory, but not delete /path/of/dir itself.

update: oh, you want to unlink according to a pattern; I missed that on the first pass.

• another intruder with the mooring in the heart of the Perl