Except for in the edge cases, which is where thinking they are the same thing gets you into trouble:
- the \( @array ) vs \@array behavior in question here
- push|splice|etc require an actual ARRAY as their first argument, not a LIST
- a LIST and an ARRAY will behave differently in scalar context (contrast scalar qw( a b c ) with scalar @{[ qw( a b c ) ]})
Those are three that readily come to my pre-morning-caffeine brane, but there's certainly others. Yes in most cases they'll behave the same, but you need to understand that it is a simplification and know where the idea breaks down. Otherwise you'll be unpleasantly surprised after you have to go chasing down squirrelly context induced wonkyness.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|