Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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("2_CleanXMLfiles.pl \"$now_string\""); system("3a_MakeTDVfilesA.pl \"$now_string\" $start_date $end_date 1>Ma +keTDVfilesA.pl.stdout 2>MakeTDVfilesA.pl.stderr");

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("2_CleanXMLfiles.pl"); system("3a_MakeTDVfilesA.pl");

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?

Thanks

I appreciate any help I can get

Ted


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

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!
  • 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
  • Outside of code tags, you may need to use entities for some characters:
            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?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others rifling through the Monastery: (4)
    As of 2014-07-29 08:48 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      My favorite superfluous repetitious redundant duplicative phrase is:









      Results (212 votes), past polls