On Wednesday, May 22, 2002, at 08:31 , Bryan R Harris wrote:
[..]
> Uh, I may be on the wrong list... Is there a pre-beginners list? =)
nope - pre-beginners are merely beginners who are
not fully in denial....
> What does this notation mean?
>
> @{$dirs{$dir}}
[..]
official answer: some coder had an emotionally disturbed childhood
and is still compensating for it in perl....
unofficially let us step back and deconstruct it
@{...} # act like the stuff inside is an @array
$dirs{$dir} # rummage around in the hash %dirs at the
# key specified by the variable $dir
the alternative strategy is to 'look for the my' - it's
the perlGeeks alternative to 'where is waldo'....
where does 'my *dirs' show up and where does 'my *dir'
show up in the code - these are different variables...
if you did
my $refBe = ref($dirs{$dir});
I'd expect it to say that it be a reference to an ARRAY.
so to USE it as if it were an Array we just stuff that
reference in the deGobulator like say
my @list = @{$dirs{$dir}};
for my $item (@list) {
print "and we see line $item\n";
}
honest, trust me, I can give up writing perl any time I want...
ciao
drieux
http://www.wetware.com/drieux/pbl/
--------------
This space left intentionally blank.
they make me write those things you know.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]