G'day mgg,

Welcome to the Monastery.

I installed Sierra (10.12.3) yesterday: "Re: Perl on Sierra (Mac OS X 10.12.x): any issues? [Upgrade completed successfully]". My experience was quite the reverse of "Everything broken.". I'm also using Perlbrew.

I didn't have Spreadsheet::XLSX installed either (it's not a core module):

$ perl -Mstrict -Mwarnings -E 'use Spreadsheet::XLSX; say $Spreadsheet +::XLSX::VERSION' Can't locate Spreadsheet/XLSX.pm in @INC (you may need to install the +Spreadsheet::XLSX module) ...

I installed it without any problems:

$ cpan ... cpan[1]> install Spreadsheet::XLSX ... MIKEB/Spreadsheet-XLSX-0.15.tar.gz /usr/bin/make install -- OK

Now, that earlier command works fine:

$ perl -Mstrict -Mwarnings -E 'use Spreadsheet::XLSX; say $Spreadsheet +::XLSX::VERSION' 0.15

You need to install any non-core modules that you want to use, for each version of Perl that you install.

In case you haven't used Perlbrew before: 'perlbrew list' shows you the installed versions; and 'perlbrew switch <perlbrew-perl-version-name>' makes that version your current version.

You also could have a problem with shebang lines in your scripts. Any that begin with lines like either of these:

#!/usr/bin/perl ... #!/usr/local/bin/perl ...

will use one of the system Perls regardless of your current Perl (i.e. the one you switched to with Perlbrew). I start all my scripts like this:

#!/usr/bin/env perl ...

That ensures the script always uses the current Perl: there's nothing else to do when you switch between versions.

— Ken


In reply to Re: Perl in Sierra by kcott
in thread Perl in Sierra by mgg

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.