I'm just trying to learn a bit of Perl and have come across this:
foreach $element (@{$records})
{
do something;
}
To my newbie eyes, this reads:
"for each element in an array named @{$records}, do something"
but, since that seems an unlikely name for an array (with "@{$
" altogether), I imagine it isn't that simple?
I've also come across "%$
" used together.
I know %
signifies a hash and $
signifies a scalar but don't know what they mean together.
Can anyone shed any light on these?
$array->[0]
– Vernice