Re: Array problem, I think

2002-11-16 Thread Paul Johnson
On Mon, Nov 11, 2002 at 06:17:58PM -0500, Cacialli, Doug wrote: > I've got oodles of data. It looks like this: > > 0 @F1@ FAM > 1 HUSB @I13@ > 1 WIFE @I14@ > 1 CHIL @I8@ > 0 @F2@ FAM > 1 HUSB @I10@ > 1 WIFE @I8@ > 1 CHIL @I11@ > 1 CHIL @I12@ > etc. [ snip problem ] > I'm familiar with substr,

Re: Array problem, I think

2002-11-16 Thread badchoice
> 0 @F1@ FAM > 1 HUSB @I13@ > 1 WIFE @I14@ > 1 CHIL @I8@ > 0 @F2@ FAM > 1 HUSB @I10@ > 1 WIFE @I8@ > 1 CHIL @I11@ > 1 CHIL @I12@ > etc. $/ = undef; for (split /\n0/, <>) { ($key) = /\@(..)/; $hash{$key} = [ /\@(\w+)\@$/gm ]; } > $individuals{"F1"}[0] = "I13"; > $individuals{"F1"

Re: Array problem, I think

2002-11-11 Thread Wiggins d'Anconia
No need to apologize. Agreed. http://danconia.org Jason Tiller wrote: Hi, Wiggins, :) On Mon, 11 Nov 2002, Wiggins d'Anconia wrote: This solution works well and is clean, if you are curious about some of the *magic* he is performing in his foreach I would suggest reading up on the special v

Re: Array problem, I think

2002-11-11 Thread Jason Tiller
Hi, Wiggins, :) On Mon, 11 Nov 2002, Wiggins d'Anconia wrote: > This solution works well and is clean, if you are curious about some > of the *magic* he is performing in his foreach I would suggest > reading up on the special variable $_ for those of us experienced in > perl it isn't as daunting

Re: Array problem, I think

2002-11-11 Thread Wiggins d'Anconia
This solution works well and is clean, if you are curious about some of the *magic* he is performing in his foreach I would suggest reading up on the special variable $_ for those of us experienced in perl it isn't as daunting to just throw a foreach (@array) in the code and know that it is goi

Re: Array problem, I think

2002-11-11 Thread Jason Tiller
Hi, Doug, :) On Mon, 11 Nov 2002, Cacialli, Doug wrote: > I'm new to programming in perl, and relatively new to programming at > all, so I apologize if this is a little hard to follow. Wasn't hard at all! You described the problem very succinctly. > I've got oodles of data. It looks like this

Re: Array problem, I think

2002-11-11 Thread Cacialli, Doug
One additional thing: The data exists in an array, where each line of raw data is a scalar string within the array. -Original Message- From: Cacialli, Doug Sent: Monday, November 11, 2002 6:18 PM To: '[EMAIL PROTECTED]' Subject: Array problem, I think Y'all, I'm n

Array problem, I think

2002-11-11 Thread Cacialli, Doug
Y'all, I'm new to programming in perl, and relatively new to programming at all, so I apologize if this is a little hard to follow. I've got oodles of data. It looks like this: 0 @F1@ FAM 1 HUSB @I13@ 1 WIFE @I14@ 1 CHIL @I8@ 0 @F2@ FAM 1 HUSB @I10@ 1 WIFE @I8@ 1 CHIL @I11@ 1 CHIL @I12@ etc. T