Code Fragments in Python & Perl