Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   unrecognized switch -E after following newbie cpan tutorial (http://www.go4expert.com/forums/unrecognized-switch-e-following-newbie-t27895/)

perlsmith 26Feb2012 04:41

unrecognized switch -E after following newbie cpan tutorial
 
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 27Feb2012 02:24

Re: unrecognized switch -E after following newbie cpan tutorial
 
Quote:

Originally Posted by perlsmith (Post 92775)
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 27Feb2012 02:35

Re: unrecognized switch -E after following newbie cpan tutorial
 
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 27Feb2012 02:56

Re: unrecognized switch -E after following newbie cpan tutorial
 
Replace "say" with "print".

perlsmith 27Feb2012 03:20

Re: unrecognized switch -E after following newbie cpan tutorial
 
You're the man! Who needs 5.10 now:)?


All times are GMT +5.5. The time now is 19:06.