in reply to any replacements for smartmatch on comparing two arrays

I found tobyink's reply on another forum (oh well is in the official docs..)
no if ($] >= 5.018), 'warnings' => 'experimental'; #or simply no warnings 'experimental'; #or with more precision no warnings 'experimental::smartmatch';

see also official docs perldelta and A little nicer way to use smartmatch on perl 5.18 and Experimental features now warn (reaching back to v5.10)
HtH

L*
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: any replacements for smartmatch on comparing two arrays
by Laurent_R (Canon) on Sep 24, 2015 at 07:49 UTC
    Well, you can suppress the warnings, as shown by Discipulus, e.g. with the pragma:
    no warnings 'experimental::smartmatch';
    However, you should IMHO carefully consider whether you really want to do that. The smart match was for a time a full-fledged feature of Perl 5 and has been "downgraded" to "experimental" with Perl 5.20 if I remember correctly. This implies that it could be strongly modified or even removed in a future version, meaning that your program might cease to work after a Perl upgrade. Frankly, I would not use that feature for any program that is not a one-off script and might be used in the future.

    Update: Sorry for a posting mistake: this post was meant as an answer to the OP, not to Discipulus's post. Too late, I am afraid, to do anything about it.

      Laurent has shown the difference between knowledge and wisdom.

      L*
      There are no rules, there are no thumbs..
      Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.