in reply to Printing BigInts
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:
Data::Dumper is often your friend in these circumstances:$c = new CGI::Cookie(-name => 'NetAppliance1.0', -value => "$id", -path => '/cgi-bin/' -secure => 0 );
produces:use Data::Dumper; print Dumper({-value => $id});
Which is a good indication that things are not as you thought :-)$VAR1 = { '-value' => bless(do {\(my $o= '+123456789123456789')}, 'Mat +h::BigInt') };
Andrew. (You should really be using CGI.pm throughout)
|
---|
Replies are listed 'Best First'. | |
---|---|
RE: Re: Printing BigInts
by Anonymous Monk on Jul 12, 2000 at 21:17 UTC | |
by chromatic (Archbishop) on Jul 12, 2000 at 21:49 UTC |
In Section
Seekers of Perl Wisdom