Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: List::MoreUtils and require

by ioannis (Vicar)
on Jun 27, 2006 at 23:41 UTC ( #557899=note: print w/ replies, xml ) Need Help??


in reply to List::MoreUtils and require

The require loads the module at runtime, yet you were trying to reference one of its functions before INIT. Here is one solution:

use warnings; my @v1 = qw(4 0 0 3); my @v2 = qw(4 0 0 3); INIT { require List::MoreUtils; my $ea = List::MoreUtils::each_array(@v1, @v2); while (my ($v, $t) = $ea->()) { } }


Comment on Re: List::MoreUtils and require
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (11)
As of 2015-07-28 23:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (260 votes), past polls