Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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

Comment on Re^2: Identical Arrays
Download Code
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 surveying the Monastery: (7)
As of 2015-11-27 09:24 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (722 votes), past polls