It sounds like you're trying to use the system Perl. I believe that it usually is a good idea to not use the system Perl anything more than a simple one liner.

If you really want to stay with the system Perl and you're not using any modules that need to be compiled (such as XS based modules), you can try using App::FatPacker which will "pack your dependencies onto your script file".

I'm not too experienced with Linux in general, but here's the approach that I would take. First, I would get away from using the system Perl. Since I probably would struggle to compile Perl from the source code, I would go the route of using perlbrew. After that, I would install all of the modules that I needed and also install PAR::Packer. Then I would use the pp utility from PAR::Packer to make a stand-alone executable, which could then be distributed and used on other systems.

I don't know if that is the "best" way to do things, but that would be my approach.


In reply to Re: stand-alone perl script(s) by dasgar
in thread stand-alone perl script(s) by ddelisle

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.