"be consistent" | |
PerlMonks |
Re: Net::Netmask not working with scalar variableby CountZero (Bishop) |
on Oct 08, 2010 at 08:39 UTC ( [id://864164]=note: print w/replies, xml ) | Need Help?? |
If you find the IP in $MYIP1[0] but not in $ff, then it tells us that there is probably something wrong with your regular expression /\b\d*\.\d*\.\d*\.\d*/ . Matching IPs can be more tricky than you think, so perhaps you should use Regexp::Common and Regexp::Common::net to make sure you are really correctly matching an IP-adress. We would really like to help you more but $fk is not getting the correct value is a bit vague and ambiguous as an error message: Aren't you getting anything at all in $ff or only parts of the IP or ...? CountZero A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James
In Section
Seekers of Perl Wisdom
|
|