ct: RE: hash 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: [
: -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:
: > :
: &g
> -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:
>
> &
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 http://www.perlmon
> 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 @
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} }[
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
---