Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Why can't I use "say" with version 5.14
- John Black
September 10, 2013, 4:00 pm
rate this thread
Re: Why can't I use "say" with version 5.14
No. That's the whole point of feature.pm: you might already have a
pre-5.10 program which uses a 'say' sub, and if 5.10 (or 5.14) turned
the builtin on by default that program would stop working.
From 5.10 onwards, 'use 5.010' will call 'use feature ":5.10"' in
addition to the compile-time check for perl 5.10. The same applies for
later versions of perl. This means you can put 'use VERSION' at the top
of each file along with strict and warnings and that file will continue
to use the semantics of the version you wrote it for even on future
versions of perl.
(Incidentally, 'use 5.012' and later also imply 'use strict'...)