Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re: Printing BigInts

by ahunter (Monk)
on Jul 12, 2000 at 18:56 UTC ( #22205=note: print w/replies, xml ) Need Help??

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:
$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});
$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 throughout)

Replies are listed 'Best First'.
RE: Re: Printing BigInts
by Anonymous Monk on Jul 12, 2000 at 21:17 UTC
    what do you mean by throughout? I did this :
    use CGI qw/:standard/; use CGI::Cookie;
      I think he means: print header(-cookie => $c);
      instead of your two print lines. Let take care of the gory details for you!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://22205]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2016-10-22 05:40 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (292 votes). Check out past polls.