merrymonk has asked for the wisdom of the Perl Monks concerning the following question:

Someone wants to use my Perl on Ubuntu and/or MAC OS. They are a competent PC user but not a programmer. They will need Perl5 with Tk
I see that there are several sites where installation details for both these operating systems are described.
Could any Monk help by suggesting which site(s) would be the most appropriate and which of the two operating systems are likely to the simpler to try?
  • Comment on Perl installation on Ubuntu and/or Mac OS

Replies are listed 'Best First'.
Re: Perl installation on Ubuntu and/or Mac OS
by ikegami (Patriarch) on Aug 01, 2024 at 22:24 UTC

    Ubuntu:

    sudo apt install perl perl-tk

    You could also install your own Perl using perlbrew. This is great if you're in a shared environment, if you better control over the versions of Perl and modules, or if you want to install modules which aren't provided by your system's package manager.

    curl -L https://install.perlbrew.pl | bash perlbrew install 5.40.0 cpan Tk

    Don't forget to add to your shell's startup script as directed.

Re: Perl installation on Ubuntu and/or Mac OS
by mldvx4 (Friar) on Aug 02, 2024 at 08:37 UTC

    As far as I know both have Perl installed by default. There are ways to install different versions of Perl on MacOS and switch between them but that is another matter.

    Open the terminal and enter,

    perl -v

    Ubuntu 24.04 aka Noble Numbat has Perl version 5.38.2 installed by default. There are some modules in place already, but when you add more it pays to make every effort to get the modules from the official repositories before turning to CPAN itself.

    As for MacOS, I have not used that for years but homebrew would be the way to add any missing modules before turning to raw CPAN.

Re: Perl installation on Ubuntu and/or Mac OS
by Anonymous Monk on Aug 02, 2024 at 04:30 UTC
    Although I've never used the Ubuntu distro(s), any Linux (or Unix) or Mac OSX I've used, already had Perl installed.
    Not sure about Tk, never used it, but it should be installable from the std repos on Linux .