in reply to smart match operator should be smarter!
use strict; use warnings; use 5.010; my @numbers = (2); my @other = (2); if (@numbers ~~ @other) { say 'yes' }else{ say 'no'; } #output: yes if (@numbers ~~ (2)) { say 'yes' }else{ say 'no'; } #output: yes
2. This is my perl -v:
This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
3. Could you post here the output of your perl -v?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: smart match operator should be smarter!
by 7stud (Deacon) on Nov 23, 2009 at 00:09 UTC |