Hi all,

Found it.... double quotes did the trick!

Thanx anyway.

Cheers!

Wim

Wim wrote:

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?





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to