other ideas in Perl and C