in reply to Re: It's so easy to become complacent.
in thread It's so easy to become complacent.

bah, variables are just one of so many things!!!
$ perl -E 'use strict; sub foo { say "hello" }; say "runtime!"; f00()' runtime! Undefined subroutine &main::f00 called at -e line 1.

Though I have to admit that not being able to declare variables explicitly (and as result, their scope) is for me one of the mayor Python issues.

Replies are listed 'Best First'.
Re^3: It's so easy to become complacent.
by eserte (Deacon) on Feb 26, 2016 at 08:21 UTC
    That's why I like to omit the parentheses whenever possible:
    $ perl -E 'use strict; sub foo { say "hello" }; say "runtime!"; foo' runtime! hello $ perl -E 'use strict; sub foo { say "hello" }; say "runtime!"; f00' Bareword "f00" not allowed while "strict subs" in use at -e line 1. Execution of -e aborted due to compilation errors.