develooper Front page | perl.perl6.language | Postings from August 2006

Re: === and array-refs

Thread Previous | Thread Next
Dave Whipp
August 17, 2006 12:47
Re: === and array-refs
Message ID:
David Green wrote:
> No, look at the example I've been using.  Two arrays (1, 2, \@x) and (1, 
> 2, \@y) clearly have different (unevaluated) contents.  "eqv" only tells 
> me whether they have the same value (when @x and @y are evaluated).  
> That's a different question -- yes, it's the more common question, but I 
> think the comparison I want to make is just as reasonable as ===, except 
> there's no easy way to do it.

does "*$a === *$b" work? I.e. splat the two arrays into sequences, and 
then do the immuable compare on those sequences.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About