array reference expected
From: bnapus (bnapus_at_yahoo.com)
Date: 10/29/03
- Next message: Jack: "calculate an average"
- Previous message: Brian McCauley: "Re: fork process to handle fifo input"
- Next in thread: Brian Harnish: "Re: array reference expected"
- Reply: Brian Harnish: "Re: array reference expected"
- Reply: Ben Morrow: "Re: array reference expected"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Oct 2003 10:50:50 -0800
Perlers -
I want to assign a value to an annonymous hash:
$hash->[$i][$j]{Score} = 1;
Why won't it accept a scalar? I get an error about perl expecting an
address to an array. What I envisioned was a hash within a 2D array.
I ended up using this:
$hash->[$i]{$j}{Score} = 1;
and it does what I want it to - just curious.
Josh
- Next message: Jack: "calculate an average"
- Previous message: Brian McCauley: "Re: fork process to handle fifo input"
- Next in thread: Brian Harnish: "Re: array reference expected"
- Reply: Brian Harnish: "Re: array reference expected"
- Reply: Ben Morrow: "Re: array reference expected"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]