in reply to Re^2: [Homework Question] Subroutines & References
in thread [Homework Question] Subroutines & References

== is the numeric comparison operator, not the assignment operator, which is quite similar: =. See perlop for details. warnings should have told you:
Useless use of numeric eq (==) in void context at ...

Also, you don't populate $a anywhere. Maybe, you meant

foreach my $a (@list_of_numbers) {
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: [Homework Question] Subroutines & References
by Hayest (Acolyte) on Feb 11, 2015 at 16:57 UTC
    I realized the == error once it executed, however, you helped out with the suggestion of the foreach statement. I've got it running properly now. Thank you!