I executed the following by itself:
commandLine.setExecutable(getPerlCommand()); commandLine.createArgument().setValue("-h");
and it worked fine:
C:\ant\bin>ant
Buildfile: build.xml

main:
foo c:\perl\bin\perl.exe -h

foo Usage: c:\Perl\bin\perl.exe switches -- programfile arguments
foo   -0octal       specify record separator (\0, if no argument)
foo   -a              autosplit mode with -n or -p (splits $_ into @F)
foo   -c              check syntax only (runs BEGIN and END blocks)
foo   -d:debugger   run scripts under debugger
foo   -Dnumber/list set debugging flags (argument is a bit mask or flags)
foo   -e 'command'    one line of script. Several -e's allowed. Omit programfile.
foo   -F/pattern/     split() pattern for autosplit (-a). The //'s are optional.
foo   -iextension   edit <> files in place (make backup if extension supplied)
foo   -Idirectory     specify @INC/#include directory (may be used more than once)
foo   -loctal       enable line ending processing, specifies line terminator
foo   -mM-module.. executes `use/no module...' before executing your script.
foo   -n              assume 'while (<>) { ... }' loop around your script
foo   -p              assume loop like -n but print line also like sed
foo   -P              run script through C preprocessor before compilation
foo   -s              enable some switch parsing for switches after script name
foo   -S              look for the script using PATH environment variable
foo   -T              turn on tainting checks
foo   -u              dump core after parsing script
foo   -U              allow unsafe operations
foo   -v              print version number, patchlevel plus VERY IMPORTANT perl info
foo   -V:variable   print perl configuration information
foo   -w              TURN WARNINGS ON FOR COMPILATION OF YOUR SCRIPT. Recommended.
foo   -xdirectory   strip off text before #!perl line and perhaps cd to directory
foo

The question now would be, how do I encapsulate the script and *its* command line variables and call it with Perl? Otherwise, it appears Perl may not be executing the script at all...

Thank you :>

-P0w3rK!d


In reply to Re: Re: Ant, Perl, and where did my STDOUT go? by P0w3rK!d
in thread Ant, Perl, and where did my STDOUT go? by P0w3rK!d

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.