Math::BigInt returns references to blessed scalars,
and uses overload to cause it to be stringified when
you refer to it in a string. You put the reference
directly into the argument block used by CGI::Cookie,
and CGI::Cookie doesn't know what to do with it.
Simple solution: force it to be stringified:
$c = new CGI::Cookie(-name => 'NetAppliance1.0',
-value => "$id",
-path => '/cgi-bin/'
-secure => 0
);
Data::Dumper is often your friend in these circumstances:
use Data::Dumper;
print Dumper({-value => $id});
produces:
$VAR1 = {
'-value' => bless(do {\(my $o= '+123456789123456789')}, 'Mat
+h::BigInt')
};
Which is a good indication that things are not as you thought :-)
Andrew. (You should really be using CGI.pm throughout)