Subject: | Apply issues |
I recently ran into this bug while "applying" lc to an array: the values
appear to be unchanged.
Test case 2 does work but I had expected the first one to as well.
#!/usr/bin/perl
use strict;
use warnings;
use List::MoreUtils qw/apply/;
my @t = qw/ t T t/;
# Apply test cases
printf("%s\n", join qq{, }, apply {lc} @t);
printf("%s\n", join qq{, }, apply {$_=lc} @t);
# Map test case
printf("%s\n", join qq{, }, map {lc} @t);
OUTPUT:
t, T, t
t, t, t
t, t, t
EXPECTED:
t, t, t
t, t, t
t, t, t