Maybe it's something weird with your system or your shell?. What kind of system are you on? What is $ENV{SHELL} set to? Does system("ls |cat"); work?
Or maybe it's an invisible character (like a carriage return) in one of your strings. Try piping the program through cat -e to show any nonprinting characters.
A third idea is to strace/truss/ktrace your program, to see what it's actually running.
In reply to Re^2: using pipes in a system() call
by sgifford
in thread using pipes in a system() call
by mcarlson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |