in reply to Why do I need 'use 5.010;' ahen I am running '5.24'

say states:

"say is available only if the say feature is enabled or if it is prefixed with CORE:: . The say feature is enabled automatically with a use v5.10 (or higher) declaration in the current scope."

See also feature.

#!/usr/bin/perl use feature say; say 'derp';

Update: doh, the above will fail with use strict; so:

use strict; use warnings; use feature 'say'; say 'Derp';

You may be interested in Modern::Perl. Thanks choroba.

Replies are listed 'Best First'.
Re^2: Why do I need 'use 5.010;' ahen I am running '5.24'
by Tux (Canon) on Jul 01, 2017 at 09:06 UTC

    That is why I use 5.12, as that implies strict:

    $ perl -we'use 5.10.0; say 1, $x' Name "main::x" used only once: possible typo at -e line 1. Use of uninitialized value $x in say at -e line 1. 1 $ perl -we'use 5.12.0; say 1, $x' Global symbol "$x" requires explicit package name (did you forget to d +eclare "my $x"?) at -e line 1. Execution of -e aborted due to compilation errors.

    Enjoy, Have FUN! H.Merijn