The Open Source Swiss Army Knife

/code/perl/unix_perl/
/code/perl/unix_perl/ + sub-categories
http://www.sirfsup.com/
web directory content
    
      

Not logged in
Chat Register Login
return to:  http:/www.sirfsup.com      /code   /perl   /unix_perl 
Permalink: stdin_out.txt
Title: add
article options : please login   |  raw source view  

#!/usr/bin/perl
$cmd = 'cat uni2.pl';
@all = `($cmd | sed -e 's//stdout: /' ) 2>&1`;
for (@all) { push @{ s/stdout: // ? \@outlines : \@errlines }, $_ }
print "STDOUT:\n", @outlines, "\n";
print "STDERR:\n", @errlines, "\n";


Leave a Reply
Your Name:     anonymous
Your Email:
Website:  
Comments:

The author will be notified of your reply.
return to top