in reply to Re: Scalar value @scores_sorted[$i] better written as $scores_sorted[$i]
in thread Scalar value @scores_sorted[$i] better written as $scores_sorted[$i]

Perl 5 is stricter - it insists on Scalars being represented by the "$" sigil - in your case, printing ONE score item is a scalar, so perl (5) expects a "$".
Partially right. In this case, a one element list is printed.

I find the warning highly annoying. It's a case where Perl knows what I mean, does what I mean, and still thinks it's Python, insisting in one true way of doing things. Despite it being the syntax of the future.

  • Comment on Re^2: Scalar value @scores_sorted[$i] better written as $scores_sorted[$i]