hash of hash of array slices

2004-01-26 Thread Paul Kraus
This works Foreach ( @{$hash{$key1}{$key2}} ) This does note Foreach ( @{($hash{$key1}{$key2})[9..1]} ) This gives me this error Can't use undefined value as an array reference. TIA, Paul Kraus --- PEL Supply Company Network Administrator

RE: hash of hash of array slices

2004-01-26 Thread Charles K. Clarkson
Paul Kraus [EMAIL PROTECTED] wrote: : : This works : : Foreach ( @{$hash{$key1}{$key2}} ) : : This does note : : Foreach ( @{($hash{$key1}{$key2})[9..1]} ) : : This gives me this error : Can't use undefined value as an array reference. : foreach ( reverse @{ $hash{$key1}{$key2} }[ 1

RE: hash of hash of array slices

2004-01-26 Thread Paul Kraus
Paul Kraus [EMAIL PROTECTED] wrote: : : This works : : Foreach ( @{$hash{$key1}{$key2}} ) : : This does note : : Foreach ( @{($hash{$key1}{$key2})[9..1]} ) : : This gives me this error : Can't use undefined value as an array reference. : foreach ( reverse @{ $hash{$key1

Re: hash of hash of array slices

2004-01-26 Thread Jeff 'japhy' Pinyan
On Jan 26, Paul Kraus said: foreach ( @{($hash{$key1}{$key2})[9..1]} ) It should be: foreach ( @{ $hash{$key1}{$key2} }[1 .. 10] ) { ... } based on your other email. -- Jeff japhy Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734

RE: hash of hash of array slices

2004-01-26 Thread Paul Kraus
-Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED] Sent: Monday, January 26, 2004 12:10 PM To: Paul Kraus Cc: 'Perl Beginners' Subject: Re: hash of hash of array slices On Jan 26, Paul Kraus said: foreach ( @{($hash{$key1}{$key2})[9..1]} ) It should

RE: hash of hash of array slices

2004-01-26 Thread Charles K. Clarkson
: -Original Message- : From: Paul Kraus [mailto:[EMAIL PROTECTED] : Sent: Monday, January 26, 2004 10:52 AM : To: 'Charles K. Clarkson'; 'Perl Beginners' : Subject: RE: hash of hash of array slices : : : Paul Kraus [EMAIL PROTECTED] wrote: : : : : This works : : : : Foreach

RE: hash of hash of array slices

2004-01-26 Thread Tim Johnson
of hash of array slices This worked fine. However I was under the impression that any time you worked with a slice that you had to surround the array in parenthesis. When else does this not apply? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Hash of hash of array

2002-01-09 Thread Ahmed Moustafa
Hi All, My data structure is a hash of a hash of an array. I build it from an input file by the following code. Could you help me write it back to an output file, please? # Code Begins %data = ( ); open (IN, in.txt) || die; while (IN) { chop; ($user_name, $file_name, $modified_by

Re: Hash of hash of array

2002-01-09 Thread Jon Molin
Ahmed Moustafa wrote: Hi All, My data structure is a hash of a hash of an array. I build it from an input file by the following code. Could you help me write it back to an output file, please? # Code Begins %data = ( ); open (IN, in.txt) || die; while (IN) { chop; ($user_name

Re: Hash of hash of array

2002-01-09 Thread Ahmed Moustafa
Jon,thanks a lot for your help :) Jon Molin wrote: Ahmed Moustafa wrote: Hi All, My data structure is a hash of a hash of an array. I build it from an input file by the following code. Could you help me write it back to an output file, please? # Code Begins %data = ( ); open (IN, in.txt