You already have perl installed, or else you would have gotten an Operating System error when you ran it. The way you're calling the script is correct.

To check perl's version:

perl -v This is perl 5, version 24, subversion 0 (v5.24.0) built for x86_64-li +nux (with 1 registered patch, see perl -V for more detail) ...

Upgrading (or otherwise mucking about in any way) your system perl is *highly* recommended against. I, personally have hosed a system or two in the past by doing this (same goes for system Python). You're on Linux, so I say take a look at Perlbrew. If you must upgrade your system perl, use Ubuntu's package manager, and do a complete backup/snapshot before you do.

To both check if a module is installed, and get its version if it is:

perl -MData::Dumper -E 'say Data::Dumper->VERSION' 2.160

If the module isn't installed, you'll get a similar error to what you got:

perl -MTkx -E 'say Tkx->VERSION' Can't locate Tkx.pm in @INC (you may need to install the Tkx module) ( +@INC contains: /home/spek/perl5/perlbrew/perls/perl-5.24.0/lib/site_p +erl/5.24.0/x86_64-linux /home/spek/perl5/perlbrew/perls/perl-5.24.0/l +ib/site_perl/5.24.0 /home/spek/perl5/perlbrew/perls/perl-5.24.0/lib/5 +.24.0/x86_64-linux /home/spek/perl5/perlbrew/perls/perl-5.24.0/lib/5. +24.0 .). BEGIN failed--compilation aborted.

The -M flag is akin to having use Module::Name within a perl script.

To install a module, use cpan or if it's installed on your system, cpanm:

cpan install Tkx

...or:

cpanm Tkx

In reply to Re: ENMTools_1.4.4.pl on Ubuntu 15.04? by stevieb
in thread ENMTools_1.4.4.pl on Ubuntu 15.04? by Steve Research

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.