in reply to Document maintenance script

Overall nice. There are a handful of idioms that would save typing though.

First, when you're iterating through a list, you don't have to keep an index around:

my @items = (1, 2, 3, 4, 5); foreach my $item (@items) { print "Got item $item!\n"; }
Next, you don't need to stringify a variable if you want to bind it to a regex.

Third, there's a lot of duplication. From my skimming of the code, it's in your conditionals. There are plenty of ways to handle this, from stringing conditionals together to calling a subroutine. I'd do it all in just one regex, though:

if ($item =~ /^(foo|bar|baz)/) { # do several things }
You can probably get rid of the '+' in your opens. It's pretty rare that you need both read and write access. The rest of it is pretty solid, though you might want to be careful calling subs with a leading ampersand... it'll pass along the contents of @_. I prefer sub() to pass no arguments explicitly.

Update: Renamed to fit new title.