unrecognized switch -E after following newbie cpan tutorial

Newbie Member
26Feb2012,04:41   #1
perlsmith's Avatar
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!!
Go4Expert Member
27Feb2012,02:24   #2
chorny's Avatar
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'
Newbie Member
27Feb2012,02:35   #3
perlsmith's Avatar
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!
Go4Expert Member
27Feb2012,02:56   #4
chorny's Avatar
Replace "say" with "print".
perlsmith, shabbir likes this
Newbie Member
27Feb2012,03:20   #5
perlsmith's Avatar
You're the man! Who needs 5.10 now?