Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: generate array of hashes

by jeffa (Bishop)
on Dec 10, 2015 at 21:52 UTC ( [id://1149941]=note: print w/replies, xml ) Need Help??


in reply to [SOLVED] generate array of hashes

You are doing something that we cannot see, the following works just fine:

use strict; use warnings; my %hoh ; my ($dn,$mail) = qw( dn mail ); my @members = qw(foo bar baz); my @email_addrs = qw( foo@here bar@there ); my $rec = { DN => $dn, MAIL => $mail, MEMBERS => [ @members ], PROXYADDRS => [ @email_addrs ], }; $hoh{$dn} = $rec; use Data::Dumper; print Dumper \%hoh;

While it is great to isolate your problem, be sure and post a complete example. It helps with the rubber ducking process. :)

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)

Replies are listed 'Best First'.
Re^2: generate array of hashes
by stevieb (Canon) on Dec 10, 2015 at 22:03 UTC
    For completeness... GrandFather pointed this out to me not too long ago (I'm pretty sure of that... If I'm mistaken, I apologize). Rubber duck debugging. We all do it :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-25 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found