With regards to \@ and \$: I'm assuming that you're talking about something like:
Is that the case?my $array_ref = \@array; my $hash_ref = \%hash;
What's happening there is that you're taking a reference to an array and a hash. References are described in perlref. They're kind of like C pointers, but also kind of not. :)
References are scalars that "point" to other variables--the other variables can be arrays, hashes, scalars, etc. To use the variable pointed to by a reference, you have to dereference the reference. This could also be what you were referring to by $$, because if we had a reference to a scalar, like this:
then we could get access to the value "foo bar" by dereferencing $ref, like this:my $string = "foo bar"; my $ref = \$string;
$original now contains "foo bar".my $original = $$ref;
So take a look at perlref and also at perlreftut, which might actually be a better place to start than perlref, depending on your experience.
In reply to Re: A few questions
by btrott
in thread A few questions
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |