in reply to hash of arrays -- Im missing something

In addition to the other bugs, I think:
for ( @nvalue ) { print "$_\n$_[0]\n$_[0]->[0]\n"; $d++; print join(", ",$_[$e]->[$d]); } print "\n";
should be written as:
for ( @nvalue ) { print "$_\n$_->[0]\n$_->[0][0]\n"; $d++; print join(", ",$_->[$e][$d]); # XXX: join() ? } print "\n";
The problem is that
$_[0]
means "element 0 of the @_ array", whereas
$_->[0]
means "element 0 of the array referred to by $_".

_____________________________________________________
Jeff japhy Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: hash of arrays -- Im missing something
by snafu (Chaplain) on Jul 26, 2001 at 07:26 UTC
    Excellent Japhy. This helps out immensely. I really get futsed up with the references and dereferences and the syntax for both. This helps out quite a bit. Thanks.

    ----------
    - Jim