Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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.


    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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2016-10-28 04:46 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (375 votes). Check out past polls.