Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

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]
[choroba]: Munich is kind of close from here
[Corion]: marto: Maybe in three years it'll be Berlin again ;)
[marto]: in 3 years I may be able to go :P
[Corion]: choroba: Both teams will ponder on whether/where/how to organize things. The workshop will be mainly in German though
[Corion]: marto: Hehe ;)
[marto]: my out of working hours time is very scarce at the moment
[marto]: unfortunately for you guys I can still access PM during the day :P
[Corion]: marto: Ow, I hope that gets better soonish! But I feel some $work-timecrunch looming at my $work as well
[Corion]: marto: Ah, so you can multiplex work and PM time ;-D
[Corion]: The upside to this is that I've reduced my $work (well, $paid) time to 80%, so I'll be at $work only four days/week, which will hopefully make the crunch less crunchy on me ;)

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2017-06-29 08:19 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (655 votes). Check out past polls.