The reason for this request is that I must ensure that I'm not using File::Path::remove_tree on "/" or any other major directory
In unix, you can compare the path's dev+inode (as returned by stat/lstat) against those of your major directories (and their parents) to see if they're the same path. This will work for hard links whereas realpath only works with symlinks.
In reply to Re: Simple Path Cleanup
by ikegami
in thread Simple Path Cleanup
by wesley.spikes
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |