in reply to Re^3: List vs array printing in perl
in thread List vs array printing in perl

"Similarly, if the specified Perl version is greater than or equal to 5.12.0, strictures are enabled lexically as with use strict . "

According to the documentation, you need use 5.012;.

Replies are listed 'Best First'.
Re^5: List vs array printing in perl
by hippo (Archbishop) on Apr 01, 2016 at 15:54 UTC

    The docs may be right, but 5.011 works for me (on 5.20):

    $ cat xxx.pl #!/usr/bin/env perl use 5.011; use warnings; $x = 1; $ ./xxx.pl Global symbol "$x" requires explicit package name at ./xxx.pl line 5. Execution of ./xxx.pl aborted due to compilation errors.

    That said, I see no great advantage to having a non-stable-release version as the minimum requirement, especially such an old one. YMMV.

      I see. It's probably documented that way because 5.11 (and other odd version since 5.6) is a version put out for testing, not for use. Or maybe it didn't work in 5.11.0.
      when I set up my template, I wanted to specify the lowest possible version implying strict. Didn't think about non-stable vs. stable. (and the lowest I'm using effectively is 5.14, anyway)