If you're doing any filesystem based manipulation, then it's probably easier to use the shell and tradition Unix utilities. If you're manipulating files, the sort of thing where awk and sed start becoming important (particularly complex manipulations with awk and sed), you're probably better off with Python. Those use cases are pretty much why languages like Perl and Python came to be.