Nice little utility, but why the "use diagnostics" in production code? Diagnostics just makes the error messages more verbose and eliminates dups. Seems like a little overkill to me. You can also call perl with the -w argument to turn on warnings. It obviously works either way, but I've usually seen it as the flag.