Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: A simple Comparison

by btrott (Parson)
on Jun 30, 2000 at 21:11 UTC ( #20628=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
        my $obj1 = new Obj;
        my $obj2 = new Obj;
        if (freeze($obj1) eq freeze($obj2)) {
            ## They're the same.
  2. or download this
        package Obj;
        use Storable qw/freeze/;
        use overload '==' => \&compare;
        sub compare { return freeze($_[0]) eq freeze($_[1]) }
  3. or download this
        if ($obj1 == $obj2) {
            # They're the same.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://20628]
[Corion]: Whee! Germanys Grand Central Airport (for Berlin, re-scheduled for the thrid or fourth time, to open now in 2018) has just fired their technical lead
[ambrus]: Corion: Is their budget estimate four times the initial estimate yet? Was the construction late by six months already three months after they started?
[marto]: I'll believe it when I see it. That's been due for many years now :P
[marto]: oddly the last time I was there I saw a zeppelin in flight for the first time
[Corion]: ambrus: I don't know how far the budget estimate has been overrun yet

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (10)
As of 2017-02-23 11:56 GMT
Find Nodes?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?

    Results (345 votes). Check out past polls.