Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Net::Netmask not working with scalar variable

by CountZero (Bishop)
on Oct 08, 2010 at 08:39 UTC ( [id://864164]=note: print w/replies, xml ) Need Help??


in reply to Net::Netmask not working with scalar variable

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

Log In?
Username:
Password:

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

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

    No recent polls found