in reply to Python 'is' command

The [Python] 'is' command ... checks whether the same memory reference is used in each case. ... I am assuming that you can do exactly the same in Perl using a ref command in conjunction with '=='.

No ref command need apply.

c:\@Work\Perl\monks>perl -wMstrict -le "my $ar_a = [ qw(a b c d) ]; my $ar_b = $ar_a; ;; print 0+$ar_a; print 0+$ar_b; ;; print 'is equal' if $ar_a == $ar_b; " 22632908 22632908 is equal
This works due to numeric coercion of a reference.


Give a man a fish:  <%-{-{-{-<