Net::Netmask -> match usage problems



Hey guys...I am having some problems which may be a newbie type of
questions but i figured I would ask...

I am using the Net::Netmask module to work with a subnet and try to
identify if a given ip is part of that subnet.

Taking some from

http://www.cpan.org/modules/by-module/Net/Net-Netmask-1.9007.readme

We have an $subnetIp, and a box $IP. We created a

$subnetIp = "148.1.2.0";
$IP = "148.1.2.3";
$net = new Net::Netmask($subnetIp);
$result = $net->match($IP);
$result += 0;

if ( $result ) {
# Part of the Subnet
} else {
# Not Part of the Subnet
}

Now for some reason, it always returns 0 or false which causes it to
always to run the not part of the subnet code.

What am I doing wrong?

Eric

.



Relevant Pages

  • SUMMARY: IP Multipathing. (Final, I Promise :)
    ... I think I got it figured out (and the right terminology too). ... Putting all the IP's on the same IP subnet made it work (I would like ... to have done it the other way, but hey, it works). ...
    (SunManagers)
  • Re: MCSE 2003
    ... > Hey, lay off. ... He's a future MCSE. ... Even I can subnet. ...
    (microsoft.public.cert.exam.mcse)
  • Re: How to set a static IP??
    ... address of 192.168.1.51 would be the second one in the DHCP range and ... Yep, while an example, if he used that one would plonk his machine on a ... totally different subnet. ... Prev by Date: ...
    (alt.internet.wireless)
  • Re: 2 Nics - one to internet one to VPN
    ... One Nic per subnet (except for Nic Teaming situations) ... maybe this diagram will ... Prev by Date: ...
    (microsoft.public.win2000.networking)
  • Subnet or master browser issue?
    ... master browser or the way my subnet is setup? ... Prev by Date: ...
    (microsoft.public.windows.server.setup)