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.