Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Reading output of external program without Shell

by eyepopslikeamosquito (Archbishop)
on Nov 15, 2017 at 12:29 UTC ( [id://1203469]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    print "rc='$rc'\n";
    print "stdout='$outstr'\n";
    print "stderr='$errstr'\n";
    
  2. or download this
    started exe:C:\Strawberry\perl\bin\perl.exe (cmd:perl -e "print q{hell
    +o stdout}; print STDERR q{hello stderr}") ok, pid=3132.
    rc='0'
    stdout='hello stdout'
    stderr='hello stderr'
    
  3. or download this
    # Test program tt1.pl
    
    ...
    
    run_cmd_noshell($^X, $^X, '-le', 'print q{hello one};');
    run_cmd_noshell($^X, 'perl', '-le', 'print q{hello two}; exit 42;');
    
  4. or download this
    run 'C:\Strawberry\perl\bin\perl.exe' with args:
        'C:\Strawberry\perl\bin\perl.exe -le print q{hello one};'
    ...
        'perl -le print q{hello two}; exit 42;'
    hello two
    error: exit code=42
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1203469]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 14:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found