--- Bryan Gmyrek <[EMAIL PROTECTED]> wrote:
> I've written a program where I need to use an array of hashes. The
> basic code I am having problems with is:
>
> sub read_from_file{
> #input: file name that holds lines of info in the form key: value
> #action: add these to an array of hashes
> #
-Original Message-
From: Bryan Gmyrek
Sent: Friday, June 08, 2001 5:15 PM
To: '[EMAIL PROTECTED]'
Subject: Arrays of Hashes
I've written a program where I need to use an array of hashes. The
basic code I am having problems with is:
sub read_from_file{
#input: file
On Jun 8, Bryan Gmyrek said:
> if(/separator/){
> $i++;
> }
>seperator
Your spelling is inconsistent.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
I am Marillion, the wielder of Ringril, known as Hesinaur, th
I've written a program where I need to use an array of hashes. The
basic code I am having problems with is:
sub read_from_file{
#input: file name that holds lines of info in the form key: value
#action: add these to an array of hashes
#return: array of hashes
my $file = $_[0];
m
- Original Message -
From: David H. Adler <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 7:13 PM
Subject: Re: Arrays of hashes?
(...)
> Technically, that's not *literally* possible. But you can have an array
> of *references* to hashes
--- "David H. Adler" <[EMAIL PROTECTED]> wrote:
> On Thu, May 17, 2001 at 12:08:56PM -0500, John Storms wrote:
> > Is it possible to have an array of associative arrays?
>
> Technically, that's not *literally* possible. But you can have an
> array of *references* to hashes (as assoc. arrays ten
On Thu, 17 May 2001, John Storms wrote:
> Is it possible to have an array of associative arrays?
Sure. Just stick hashrefs into each array element:
my @array = (
{ name => 'Jim', location => 'Buffalo' },
{ name => 'Bill', location => 'Boston' }
);
T
On Thu, May 17, 2001 at 12:08:56PM -0500, John Storms wrote:
> Is it possible to have an array of associative arrays?
Technically, that's not *literally* possible. But you can have an array
of *references* to hashes (as assoc. arrays tend to be called nowadays).
You should take a look at
perl
Is it possible to have an array of associative arrays?
---
[EMAIL PROTECTED] (Galactic Hero)
Diplomacy: The art of saying good doggie
while searching for a big rock.