in reply to smart match operator should be smarter!
This doesn't work at all for me:my @arr1 = (2, 34); say "34" if @arr1 ~~ 34; #no output...??
This works for me. (it says "34")
This doesn't work either:my @arr1 = ('hello', 'goodbye'); say "array size is 2" if @arr1 ~~ 2;
This also works as documented (no output except warnings about comparing numeric value with strings)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: smart match operator should be smarter!
by ikegami (Patriarch) on Nov 21, 2009 at 18:40 UTC | |
by zwon (Abbot) on Nov 21, 2009 at 18:48 UTC | |
by ikegami (Patriarch) on Nov 21, 2009 at 19:00 UTC | |
by zwon (Abbot) on Nov 22, 2009 at 15:37 UTC | |
by ikegami (Patriarch) on Nov 22, 2009 at 18:09 UTC |