I've been using Perl on macOS (and previously, Mac OS X) for quite a few years; however, I don't have it in front of me now so I can't show examples.

++haukex is quite correct. system works as documented (i.e. system LIST) on macOS.

Beyond corroborating that, I did want to provide some advice regarding:

"I am quite new to using Perl on a macOS"

The version of Perl provided by Apple, often referred to as the System Perl, and found in /usr/bin/perl, should generally be avoided outside of specific system use. This Perl is provided for use by macOS, is often some versions behind the current stable one, and may contain its own specific patches. Installing what appears to be a quite innocent CPAN module, may upgrade a dependency, and potentially cause problems with macOS itself. When Apple upgrades macOS, its Perl may also be upgraded (let's say from 5.X to 5.Y): when this happens, everything under 5.X is completely removed, including all CPAN and personal modules you may have installed.

I'd strongly recommend you install perlbrew (see App::perlbrew). I've been using this for years, as have many others here, without any problems. If you do have any issues, there's plenty of people here who can help you.

— Ken


In reply to Re: launching external process macOS by kcott
in thread launching external process macOS by Anonymous Monk

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.