in reply to Re^2: Concatenating more than one variable in perl
in thread Concatenating more than one variable in perl
well, if you beg me so nicely... ;-)
DB<100> use List::MoreUtils "pairwise" DB<101> @vars=qw(X Y) => ("X", "Y") DB<102> @appends=qw(x y) => ("x", "y") DB<103> pairwise { $a .= $b } @vars, @appends => ("Xx", "Yy") DB<104> @vars => ("Xx", "Yy")
and for completeness
DB<105> @vars=qw(X Y) => ("X", "Y") DB<106> @vars = pairwise { $a . $b } @vars, @appends => ("Xx", "Yy")
Cheers Rolf
(addicted to the Perl Programming Language)
|
---|