I forgot map returns the last item in its block.

I want what $_ became, not the "1" returned from the s/// :)
This commit is contained in:
Bradley M. Kuhn 2018-07-25 09:49:50 -07:00
parent e11ceab5dd
commit c9c3b8b01e

View file

@ -59,7 +59,7 @@ foreach my $ticketSpec (@ticketSpecs) {
} }
foreach my $paymentMethod (sort { $a cmp $b } keys %payments) { foreach my $paymentMethod (sort { $a cmp $b } keys %payments) {
print "$paymentMethod: Count: ", scalar(@{$payments{$paymentMethod}}), "\n"; print "$paymentMethod: Count: ", scalar(@{$payments{$paymentMethod}}), "\n";
print " Tickets: ", join(", ", map { s%^\s*ticket\s*/\s*%%; } @{$payments{$paymentMethod}}); print " Tickets: ", join(", ", map { s%^\s*ticket\s*/\s*%%; $_; } @{$payments{$paymentMethod}}), "\n";
} }
############################################################################### ###############################################################################
# #