Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^3: [Homework Question] Subroutines & References

by choroba (Cardinal)
on Feb 11, 2015 at 16:33 UTC ( [id://1116352]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1116352]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-19 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found