1) How do I execute a perl file that I already converted to bytecode (perl -MO=Bytecode hello.pl)? Specifically, how do I use the byteload_fh () function mentioned in the docs? Even if you are not sure, I would appreciate a guess as to how to experiment, since I am not good with filehandles.

2)I found the ByteLoader.pm module, but I'm not sure if I'm using it correctly, and if I am, I can't get it to work all the time (even with a simple helloworld script, sometimes it works, sometimes not, beats me....). Basically I just open up the file containing the bytecode, add the following to the top of the file:
#!/usr/bin/perl use ByteLoader 0.03;
after which the bytecode follows. I would rather use byteload_fh() if I only knew how.

3) will converting to bytecode include the perl modules that I have "used" in my script? or does that only happen with a full C (perlcc) compile?

In reply to Perl bytecode on unix by fpi

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.