Completed p3 in Perl