in reply to RE: RE: RE: Comparing Arrays
in thread Comparing Arrays

you can avoid this error by performing the test twice, changing the separator between the two tests. i believe (until someone can show me a counter example) that it is impossible to construct two different arrays that will pass this test twice with different separators. ( <--- was that really english? wow was that poorly written. )

jeff

Update: this post was mostly to show how to avoid the error in the stringifying subroutine, but i also did some benchmarking. and... here's what i've found. testing with two separators takes about the same amount of time as looping if the arrays are identical. i don't really know about memory requirements though.

Replies are listed 'Best First'.
RE: RE: RE: RE: RE: Comparing Arrays
by merlyn (Sage) on Sep 01, 2000 at 23:12 UTC
    By that time, you've thrown around so much temporary string space and stringification stuff that you might as well have done the loop.

    -- Randal L. Schwartz, Perl hacker