ToddAndMargo wrote:
# perl -Msay -e 'say "Hi";'
Can't locate say.pm in @INC (you may need to install the say module) (@INC
contains: /usr/local/lib64/perl5 /usr/local/share/perl5
/usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5
/usr/share/perl5).
BEGIN failed--compilation aborted.
And I tried downloading it from cpan and it won't install.
What am I missing?
From the perl documentation¹, either of these work:
$ perl -e 'CORE::say "Hi";'
Hi
$ perl -e 'use feature 'say'; say "Hi";'
Hi
¹
https://perldoc.perl.org/functions/say.html
--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
What do Atheists scream during sex?
'Ohhh, chemical chance, chemical chance'
-- Bill Hicks