Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (10)
As of 2016-07-28 17:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What is your favorite alternate name for a (specific) keyboard key?


















    Results (255 votes). Check out past polls.