Not a bad dissection, but it probably should be pointed out
that Tom Christiansen covered it in one
of his FMTEYEWTK (Far More Than Everything You Ever Wanted
To Know) papers, which you can find under CPAN's
documentation section, and it's covered
in the Perl Cookbook (Christiansen
and Nathan Torkington) in section 4.15.