jds17 has asked for the wisdom of the Perl Monks concerning the following question:
So, no smart match here. Of course I get the errormy %feature = ( switch => 'feature_switch', say => "feature_say", state => "feature_state", );
when trying "use feature '~~';". It seems to be partially working, though, even if I don't declare the usage. E.g. the following test program:Feature "~~" is not supported by Perl 5.10.0 at ...
Prints outuse feature qw / say /; @a = (1, 17, 4); say "first match succeeds" if (@a ~~ 17); say "second match fails" unless ((1, 17, 4) ~~ 17);
I would really like to use the smart match operator, too. Do you know when this will be fully supported in Strawberry Perl or if I overlooked something?first match succeeds second match fails
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Smart match operator support in Strawberry perl 5.10.0.1 (array vs. list)
by almut (Canon) on May 22, 2008 at 10:24 UTC | |
by jds17 (Pilgrim) on May 22, 2008 at 15:57 UTC | |
|
Re: Smart match operator support in Strawberry perl 5.10.0.1
by moritz (Cardinal) on May 22, 2008 at 09:20 UTC | |
|
Re: Smart match operator support in Strawberry perl 5.10.0.1
by Khen1950fx (Canon) on May 22, 2008 at 10:17 UTC |