Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
XP is just a number
 
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


Comment on Re^2: Identical Arrays
Download Code
Re^3: Identical Arrays
by CountZero (Chancellor) 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 perusing the Monastery: (6)
As of 2014-04-19 00:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (473 votes), past polls