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

Re^2: Identical Arrays

by philiprbrenan (Monk)
on Aug 26, 2012 at 13:26 UTC ( #989821=note: print w/replies, xml ) Need Help??


in reply to Re: Identical Arrays
in thread Identical Arrays

Not so easy!

my @one = (chr(1), chr(1), chr(1)); my @two = (chr(1).chr(0).chr(1), chr(1)); say identical(@one, @two); # returns 1

Replies are listed 'Best First'.
Re^3: Identical Arrays
by CountZero (Bishop) on Aug 26, 2012 at 20:28 UTC
    I know. This is one of the degenerate cases where a specially crafted string will break this simple subroutine.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://989821]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2017-10-22 21:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (275 votes). Check out past polls.

    Notices?