Hi,
is there any way to execute the following script without using a file
myfile.txt.
I have tested with a variable @X whith the same content as myfile.txt
($command='prog @X' but dont work correctlly.

Thanks for any suggestion
KN

#!/usr/local/bin/perl

use IPC::Open3;
my ($commande);
$commande = 'prog <myfile.txt';
$pid = open3(*SON_IN, *SON_OUT, *SON_ERR, $commande);
close(SON_IN);  
@lignes_out = <SON_OUT>;          
@lignes_err = <SON_ERR>;            
print "STDOUT:\n", @lignes_out, "\n";
print "STDERR:\n", @lignes_err, "\n"; 

where prog is an extern program and the content of myfile.txt is like:
find 'perl'
show


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to