in reply to use version confusion
use VERSION; defines the minimum Perl version that the script will run on (see use). In addition, it implicitly loads the feature bundle associated with that version. (Note: no VERSION; will limit the maximum Perl version, but that usage is probably pretty rare. You can also use no to disable feature bundles.)
The each docs, towards the end, say this:
To avoid confusing would-be users of your code who are running earlier versions of Perl with mysterious syntax errors, put this sort of thing at the top of your file to signal that your code will work only on Perls of a recent vintage:
use 5.012; # so keys/values/each work on arrays use 5.014; # so keys/values/each work on scalars (experimental) use 5.018; # so each assigns to $_ in a lone while test
So your script is not quite right in declaring use v5.10.1;.
|
|---|