use strict; use warnings; my @pence=qw(5 10 20 50); my @notes=qw(5 10 20 50); my ($sum1, $sum2); foreach my $c (@pence){ print "How many $c pence pieces do you have? "; my $num=; chomp $num; my $res = ($c * $num)/100; $sum1 += $res; } foreach my $n (@notes){ print "How many Ł$n notes do you have? "; my $num=; chomp $num; my $res = ($n * $num); $sum2 += $res; } my $final =$sum1+$sum2; print "You are ritch, you have $final coins!!!!!";