Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: using List::MoreUtils::zip with anon arrays ?

by nothingmuch (Priest)
on Aug 28, 2006 at 21:16 UTC ( #570050=note: print w/ replies, xml ) Need Help??


in reply to using List::MoreUtils::zip with anon arrays ?

Not that it answers your question directly, but have you seen File::stat?

-nuffin
zz zZ Z Z #!perl


Comment on Re: using List::MoreUtils::zip with anon arrays ?
Re^2: using List::MoreUtils::zip with anon arrays ?
by leocharre (Priest) on Aug 29, 2006 at 14:40 UTC

    Yes, thank you.
    The thread's really not about getting the stat data to a hash, but about usage of zip in the extended utilities. This was just an example.
    I must say though, stvn's example of slice assignment is another pretty interesting way to solve the problem.

      Yes, slices are awesome.

      Another little known feature of hash slices is that they are localizable:

      use Data::Dumper; my %hash = ( foo => 1, bar => 2 ); warn Dumper(\%hash); { local @hash{qw/bar moose/} = qw/happy joy/; warn Dumper(\%hash); } warn Dumper(\%hash); __END__ $VAR1 = { 'bar' => 2, 'foo' => 1 }; $VAR1 = { 'bar' => 'happy', 'moose' => 'joy', 'foo' => 1 }; $VAR1 = { 'bar' => 2, 'foo' => 1 };
      -nuffin
      zz zZ Z Z #!perl

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2014-09-21 09:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (168 votes), past polls