Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: All array elements the same?

by princepawn (Parson)
on Aug 02, 2000 at 12:35 UTC ( [id://25680]=note: print w/replies, xml ) Need Help??


in reply to All array elements the same?

The example of davorg took my breath away for its elegance, but as I read further I realized something. It wont work on nested structures correctly.

If the values in a nested structure are equal in value but not in reference, then his method will return false because the number of keys if greater than 1.

Replies are listed 'Best First'.
RE: Re: All array elements the same?
by davorg (Chancellor) on Aug 02, 2000 at 12:45 UTC

    You're absolutely right of course, but I think that all the proposed solutions will fail for the same reason. If you have an arrary containing data structures then you'd need to serialise it first using something like Data::Dumper or FreezeThaw.

    --
    <http://www.dave.org.uk>

    European Perl Conference - Sept 22/24 2000, ICA, London
    <http://www.yapc.org/Europe/>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-25 06:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found