Front page | perl.beginners |
Postings from December 2002
Dereferencing: help!!!!
Thread Next
From:
Wim
Date:
December 17, 2002 01:36
Subject:
Dereferencing: help!!!!
Message ID:
3DFEF02B.2020407@belbone.be
Hi,
I'm trying to put some data in a postgres database, but it is not so
easy as I expected....
This is my code:
foreach $ipaddress (sort keys %ifipaddr) {
$ip = new NetAddr::IP "$ipaddress",
"$ifnetmask{$ipaddress}";
$sth4 -> execute ($routerid,
$ifipaddr{$ipaddress},
$ipaddress,
$ifnetmask{$ipaddress},
$ip->network()
);
}
When I execute the code, I get:
Can't bind a reference (NetAddr::IP=HASH(0x85bed10))
But when I execute:
print $ip->network();
It prints the correct value...
Does someone knows how to store the value in my DB?
Thread Next
-
Dereferencing: help!!!!
by Wim