in reply to Best option for "switch/case" functionality?
Thanks for all of your posts and wonderful insights. I think I may have worded my request in such a way that it put focus on the wrong issue: the warnings for using the feature.
When the issue I was actually hoping to get addressed, more specifically, was that perls <5.18 didn't recognize the "experimental::smartmatch" and would throw a compile-time error. This prevented the script from even running to throw warnings or anything else.
I think haukex inadvertently came across the solution as no if $] ge '5.018', warnings => "experimental::smartmatch"; seems to work fine. What I was using (use warnings;\nno warnings "experimental::smartmatch";) threw the error. I guess the seemingly minor difference in syntax solves the issue.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Best option for "switch/case" functionality? (magic numbers)
by tye (Sage) on Jun 28, 2016 at 18:18 UTC | |
by Anonymous Monk on Jun 29, 2016 at 00:09 UTC | |
by tye (Sage) on Jun 29, 2016 at 02:28 UTC | |
by Anonymous Monk on Jun 29, 2016 at 05:25 UTC | |
by tye (Sage) on Jun 29, 2016 at 12:37 UTC |