3 ms·
Don't forget sigils. Because the difference between @foo and $foo is obvious, right?
by nerdponx 7y ago
Don't forget sigils. Because the difference between @foo and $foo is obvious, right?
- cygx 7y agoThat difference is indeed obvious. The issue is sigil variance.
- roryrjb 7y agoNot to someone who doesn't know Perl. But this is the same for every language. No one should be picking up a new language and working with it if they don't know it. EDIT: To clarify, I mean there should never be the expectation that you can start working in a language in earnest without properly learning it.
- yellowapple 7y ago@ → A → array $ → S → scalar That's how I learned and remember them. What makes that less obvious is when you work with references to arrays; the reference itself is a scalar, so it gets the scalar sigil. You can dereference it, though, by sticking an array sigil in front of it, thus telling the interpreter "hey, this is a scalar reference to an array".