in reply to List vs array printing in perl

Thank you for everyone who responded. I should learn to use warnings for sure. Thanks again for enlightening me. Its clear to me now.

Cheers!

Replies are listed 'Best First'.
Re^2: List vs array printing in perl
by GrandFather (Saint) on Mar 30, 2016 at 21:19 UTC
      my script template begins with
      use 5.011; # implies strict + feature 'say' use warnings;
      but that doesn't help with a one-liner. There he could use
      perl -wMstrict -e ...
      (that goes without saying, though)

        "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;.