in reply to What's Odd about the number of elements in this hash assignment?

You are assigning a hash list, not a hash reference, to the key case_001. Try this instead:

my %test_subscriptions = ( 'case_001' => { 'fname' => "$lname", 'lname' => "$fname", 'zip' => '02486', 'email' => 'test-' . $email . '\@mydomain.com', 'lists' => ['news','updates'], }, );
Square Curly brackets, not parens. :)

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)
  • Comment on Re: What's Odd about the number of elements in this hash assignment?
  • Download Code

Replies are listed 'Best First'.
Re^2: What's Odd about the number of elements in this hash assignment?
by chromatic (Archbishop) on Oct 22, 2006 at 23:11 UTC
    You are assigning a hash...

    Nope; it's just a list. Take out the parentheses and it works the same way.

Re^2: What's Odd about the number of elements in this hash assignment?
by johngg (Canon) on Oct 22, 2006 at 22:05 UTC
    ITYM curlies, not squares. :)

    Cheers,

    JohnGG