Ok so I have come to a position where I want to rip out some C code an replace it with Perl. Problem is that the C program is passed a C structure as a command line argument. As such I parse it with offsets and treat it as a binary object.

With Bash this is easy because you have access to the command line arguments in a single location($*). C isn't much more difficult. With Perl I can't seem to find a structure that is functionally equivalent. I can't join @ARGV because the os throws away repeated white space. I don't have control of the calling program to change it to quote the input either.

I could pull it from /proc or ps easy enough but that wouldn't be portable.

What esoteric part of perl have I overlooked?

In reply to Perl equivelant to bash '$*' by tillywern

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.