Hi,
I am using the latest Strawberry perl 5.10.0.1 and although 5.10.0.1 > 5.10, the smart match operator does not seem to be supported. The following code lines come from feature.pm:
my %feature = (
switch => 'feature_switch',
say => "feature_say",
state => "feature_state",
);
So, no smart match here. Of course I get the error
Feature "~~" is not supported by Perl 5.10.0 at ...
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:
use feature qw / say /;
@a = (1, 17, 4);
say "first match succeeds" if (@a ~~ 17);
say "second match fails" unless ((1, 17, 4) ~~ 17);
Prints out
first match succeeds
second match fails
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?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.