Re: Arrays of Hashes - Still stumped :(

2001-06-11 Thread Paul
--- 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 > #

Arrays of Hashes - Still stumped :(

2001-06-11 Thread Bryan Gmyrek
-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

Re: Arrays of Hashes

2001-06-08 Thread Jeff 'japhy' Pinyan
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

Arrays of Hashes

2001-06-08 Thread Bryan Gmyrek
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

Re: Arrays of hashes?

2001-05-17 Thread M.W. Koskamp
- 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

Re: Arrays of hashes?

2001-05-17 Thread Paul
--- "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

Re: Arrays of hashes?

2001-05-17 Thread Brett W. McCoy
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

Re: Arrays of hashes?

2001-05-17 Thread David H. Adler
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

Arrays of hashes?

2001-05-17 Thread John Storms
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.