General Perl utility stuff