问题
My Perl version is 5.14.4, but the function say is not working. What might be wrong?
回答1:
For backwards compatibility reasons, it's not available by default. You could use
CORE::say(...); # Requires Perl 5.16.
but it's probably better to add one of the following:
use feature qw( say ); # Requires Perl 5.10.
use v5.10; # All 5.10 features including "say".
use 5.010; # Same as previous.
use v5.14; # All 5.14 features including "say".
use 5.014; # Same as previous.
This is documented.
来源:https://stackoverflow.com/questions/29888093/perl-keyword-say-is-not-working-in-version-5-14-4