toro has asked for the wisdom of the Perl Monks concerning the following question:

Normally to include a library like use LWP at the command line I would do perl -e -MLWP "the program text" . But say I want to, say, use feature 'say' from the command line. Various inflections of perl -eMsay and perl -eM"feature 'say'" haven't worked. How should I say it? If you know what I'm saying.

Replies are listed 'Best First'.
Re: How do you include a feature from the command line?
by Corion (Patriarch) on Jul 30, 2012 at 20:50 UTC

    See perlrun.

    >perl -E "say 'hello'" hello >perl -Mfeature=say -we "say 'hello'" hello

      Thank you!!

      ...

      To any googlers who happen to stumble upon this answer, the relevant part of perlrun is the header

      Command Switches
      and then scroll down to -E and further down to -M.