ex5.pl - corrected pattern variable