in reply to Re^2: Can't get Tk.pm to work
in thread Can't get Tk.pm to work [SOLVED]

If as you say perl -v reports v5.22.1 but cpan is installing to /usr/local/lib/x86_64-linux-gnu/perl/5.20.2/ it looks as though a Ubuntu has done something weird, which wouldn't be unheard of, for example. Do you have a #!/usr/local/bin/perl if so which version? Did you try using cpanm?

My preference, for an easy life, is to install my own version of perl elsewhere, and leave the system one alone. A custom install has resulted in fewer headaches. See also perlbrew.

Replies are listed 'Best First'.
Re^4: Can't get Tk.pm to work
by igoryonya (Pilgrim) on Jan 26, 2018 at 22:44 UTC
    For over a year, I've started using:
    #!/usr/bin/env perl
    instead of using direct perl path.
    I've read, that env finds an executable from locations in PATH variable, which command also does, but it might resolve to not first encountered path with the named binary, but the best for context, so I've looked @ man which to see what other parameters it has, since env (I didn't find a way for it to just to show the paths, that it resolves), which has -a, that allows to show all possible paths, so I did:
    which -a perl
    It gave me only one path:
    /usr/bin/perl