unrecognized switch -E after following newbie cpan tutorial

perlsmith's Avatar, Join Date: Feb 2012
Newbie Member
I followed the instructions on

perl.jonallen.info/writing/articles/install-perl-modules-without-root

install is okay, make test is okay.

But, when I do the test

perl -MAcme::Time::Baby -E 'say babytime'

I get

Unrecognized switch : -E (-h will show valid options)

this is perlv5.8.5 for x86_64

Any help would be super.

Thanks!!
chorny's Avatar, Join Date: Jun 2010
Go4Expert Member
Quote:
Originally Posted by perlsmith View Post
But, when I do the test

perl -MAcme::Time::Baby -E 'say babytime'

I get

Unrecognized switch : -E (-h will show valid options)

this is perlv5.8.5 for x86_64
You perl is 8 years old, and it is too old to have this switch, it was added in perl 5.10.0. Do this:

perl -MAcme::Time::Baby -e 'print babytime'
perlsmith's Avatar, Join Date: Feb 2012
Newbie Member
Thanks for replying.

I did try that.. I got

Bareword found where operator expected at -e line 1, near "say babytime"

I will request my perl to be updated. Thanks!
chorny's Avatar, Join Date: Jun 2010
Go4Expert Member
Replace "say" with "print".
perlsmith, shabbir likes this
perlsmith's Avatar, Join Date: Feb 2012
Newbie Member
You're the man! Who needs 5.10 now?