The stupid question is the question not asked | |
PerlMonks |
Another scoping issue: How do I send 2 variables to my sub and use both.by MikeDexter (Sexton) |
on Feb 05, 2010 at 16:17 UTC ( [id://821596]=perlquestion: print w/replies, xml ) | Need Help?? |
MikeDexter has asked for the wisdom of the Perl Monks concerning the following question: I have a sub that can fetch the network information of a host. The sub looks like this:
The print lines are working, note how the print uses a $nic->{} variable. Okay, so now I want to send 2 variables into a new sub. These two variables are $platform and $nic->{device}I have a new sub call that tries to do this but when I get into the subroutine code itself, I don't know how to access the 2nd variable $nic->{device} Here is the code for my call and the sub so you can see what I am trying to do.... CALL
SUB
When I run the code I get an message telling me the following: (ignore the line numbers please)
Line 185 is the line in the sub itself with the $nic->{device} variable
Back to
Seekers of Perl Wisdom
|
|