I made in this way, with string to change inside the 
binary, because if this string are not changed, starting 
with #, the binary will work like the normal perl.exe

Since this is made for HWXperl, when I delivery hwxperl I 
can get any binary of the release and turn into a script! I 
made this with miniperl.exe too, where you don't need the 
perllib in the same directory.

I don't understand what you means with 
"I don't think you need my @ARGS = @ARGV. Just work 
directly with @ARGV". Are you talking about the 'char argv' 
on the C code? If is about this, I just made in the most 
simple and portable way, because some compilers don't deal 
with argv equally.

about '$^O=~/(msw|win|dos)/', yes is not very pretty, but 
here, when the binary can't find it self, I will put all 
the options to fix this in any OS, here are only for Win32.
I saw one time a vendor with 'MSwin' in the $^O, but I 
think this is too old. Seeing again the table, I will 
change this line...

    OS            $^O        $Config{'archname'}
    --------------------------------------------
    MS-DOS        dos
    PC-DOS        dos
    OS/2          os2
    Windows 95    MSWin32    MSWin32-x86
    Windows 98    MSWin32    MSWin32-x86
    Windows NT    MSWin32    MSWin32-x86
    Windows NT    MSWin32    MSWin32-ALPHA
    Windows NT    MSWin32    MSWin32-ppc

I will see your code on 'perl scripts executor on Win32'. 
Thanks for the link, and the reply...

"The creativity is the expression of the liberty".

In reply to Re: Re: Turn your script into binary without a compiler! :-P by gmpassos
in thread Turn your script into binary without a compiler! :-P by gmpassos

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.