You need a comma between the array and the scalar:
push @weighted, $key;In reply to Re: "Scalar found where operator expected", references
by fglock
in thread "Scalar found where operator expected", references
by jjohhn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |