The sigil to use is the type being returnedActually, it isn't. Here are some counter examples:
The sigil can influence what is returned, but foremost, it's the context that will determine what is returned. In particular, in scalar context, a scalar will always be returned.@foo # Number of elements of the array. @foo # A reference to the array. @foo[$i, $j] # Last element of slice. @foo{$k1, $k2} # Last element of slice. %foo # A reference to the hash. %foo # True/false. %foo # String with ratio of filled buckets and buckets.
In reply to Re^2: Scalar value @scores_sorted[$i] better written as $scores_sorted[$i]
by JavaFan
in thread Scalar value @scores_sorted[$i] better written as $scores_sorted[$i]
by filesurfer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |