in reply to "Scalar found where operator expected", references
You need a comma between the array and the scalar:
push @weighted, $key;
In Section
Seekers of Perl Wisdom
in reply to "Scalar found where operator expected", references
You need a comma between the array and the scalar:
push @weighted, $key;