Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

It is hard to imagine how one can get this wrong, but the following is giving me grief on one machine (and only that one out of the several that I use).

print "$ARGV[0]\n\t$ARGV[1]\n\t\t$ARGV[2]\n";

This is obvious and well documented, and something I have used for years without problems. However, on a new server (hosted in the cloud, if that matters), it is failing in a manneer that is a show-stopper. The buld of Activestate Perl is:

This is perl 5, version 14, subversion 1 (v5.14.1) built for MSWin32-x64-multi-thread

The problem is that with this particular machine, perl scripts invoked as:

system(" \"$now_string\""); system(" \"$now_string\" $start_date $end_date 1>Ma 2>");

loses the arguments. The above lines of code are the last in a driver script, and intermittently, the above lines of code behave as if the following had been executed instead:

system(""); system("");

It doesn't matter whether I am executing these programs using back ticks or using system, the behaviour is the same, but on this new machine, it happens about 80% of the time, and never on the other machines I use. That, especially, has me baffled.

Has anyne else seen this? If so, what is the fix? If not, does anyone have any ideas on how best to fix this?


I appreciate any help I can get


In reply to Has anyone seen perl losing arguments? by ted.byers

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    and all is quiet...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (2)
    As of 2018-05-25 01:31 GMT
    Find Nodes?
      Voting Booth?