Replaced the C-program with Perl.