in reply to cdppoll.pl

And of course, there could be a lot of command-line switches to control the behaviour. Maybe i have time one day ...
You might want to read The Dynamic Duo --or-- Holy Getopt::Long, Pod::UsageMan! and maybe GetOpt::Long usage style. I've used those modules in many scripts, such as rename 0.3 - now with two extra cupholders. Beyond the actual work of writing documentation which isn't to be underestimated, they make adding lots of little nits to your script a breeze. I've so far thoroughly enjoyed employing them.

Makeshifts last the longest.