Miscellaneous functions for happy-scripting in Perl