1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

unrecognized switch -E after following newbie cpan tutorial

Discussion in 'Perl' started by perlsmith, Feb 25, 2012.

  1. perlsmith

    perlsmith New Member

    Joined:
    Feb 25, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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!!
     
  2. chorny

    chorny New Member

    Joined:
    Jun 6, 2010
    Messages:
    20
    Likes Received:
    2
    Trophy Points:
    0
    Home Page:
    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'
     
  3. perlsmith

    perlsmith New Member

    Joined:
    Feb 25, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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!
     
  4. chorny

    chorny New Member

    Joined:
    Jun 6, 2010
    Messages:
    20
    Likes Received:
    2
    Trophy Points:
    0
    Home Page:
    Replace "say" with "print".
     
    shabbir and perlsmith like this.
  5. perlsmith

    perlsmith New Member

    Joined:
    Feb 25, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    You're the man! Who needs 5.10 now:)?
     

Share This Page