in reply to feeding info to C programs....

If you do system "/myfile/mktrace file.txt "; than the mktrace program receives the file name as an argument (that is in the ARGV table) not in STDIN. If you want to catch the output of the mktrace program you can use the "backtics" operator: my $output = `/myfile/mktrace file.txt`. This way the output from the mktrace program will not be spat in the STDOUT of your perl program.

By the way you can do it in the shell using the xargs command. This might be easier.

Replies are listed 'Best First'.
Re: Re: feeding info to C programs....
by bioinformatics (Friar) on Nov 05, 2003 at 23:38 UTC
    Thats my whole point. The example does not use STDIN, but mktrace does require the input via STDIN. That being the case, how can I get mktrace the info via STDIN?
    Bioinformatics