Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: pairwise() doesn't seem to work...

by AnomalousMonk (Canon)
on Oct 06, 2010 at 10:02 UTC ( #863745=note: print w/ replies, xml ) Need Help??

in reply to pairwise() doesn't seem to work...

And get rid of the  Name "main::whatever" used only once ... warnings with a  use vars qw($a $b); (or similar) statement.

>perl -wMstrict -le "use 5.010; use List::MoreUtils qw(pairwise); my @arr1 = (1, 2, 3); my @arr2 = (10, 20, 30); use vars qw($a $b); my %hash = pairwise { ($a, $b) } @arr1, @arr2; use Data::Dumper; say Dumper(\%hash); " $VAR1 = { '1' => 10, '3' => 30, '2' => 20 };

Comment on Re: pairwise() doesn't seem to work...
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://863745]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2016-02-08 15:31 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (276 votes), past polls