I don't Perl much, but aren't those both scalars and @foo is an array variable. $foo[0] would be a scalar that is the first element of @foo, right?
The main questions I have when doing something in an unfamiliar language are now:
1. What is the syntax for X
2. Can it do Y
3. Is there a library/builtin for Z
For anything else, I've probably been there, done that, got the t-shirt.
I remember using some books to get a structured introduction when I started out many years ago though.
Nowadays I'll probably just open whatever existing code there is, go "ah, so it's like that", and hack away with the help of Google.
The stuff that takes actual learning tend to be major frameworks for me, not so much whatever programming language is used.