in reply to Re^2: string diff and comparein thread string diff and compare
my ( $rold, $rnew ) = map scalar reverse, $old, $new;
Is just a different way of saying:
my $rold = reverse $old;
my $rnew = reverse $new;
You need to use scalar because reverse is in list context in the map expression.
There are other ways of enforcing scalar context which are a lot more fun. :-)
use 5.010; use strict; use warnings all => 'FATAL';
my ( $old, $new ) = qw( old new );
my ( $rold, $rnew ) = map~~reverse, $old, $new;
"$old => $rold",
"$new => $rnew";
There is no Extraterrestrial life
There aren't any suitably capable Extraterrestrials
Interstellar travel is too difficult
We're too uncool / not worth the trouble
What do you mean they haven't visited?
Results (468 votes). Check out past polls.