in reply to Re^2: Failed array attemp
in thread Failed array attemp

The ~~ was intentional. It's the smart match operator. == won't cut it.

Smart match was introduced in Perl 5.9.3, about 6 years ago.

perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'

Replies are listed 'Best First'.
Re^4: Failed array attemp
by Anonymous Monk on May 13, 2012 at 21:56 UTC
    What if I have perl v5.8.5 (company provided and cannt upgrade)?

      There's this, but it's straying into seriously unreadable territory:

      push @z, (grep { my $x = $_; grep { $x == $_ } @y } @x) ? 'y' : 'n';
      perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'