Hey
I may be wrong, but I suspect the issue isn't the buffering (though you should try that too), but is instead that you aren't reading the output before the command finishes. Depending on what you're doing, you may be able to do a piped open on the command, and capture the output that way. That would go something like this:
open(COMMAND, "$cmd |");
while($out=<COMMAND>) {
print "$out";
}
Check out more about Open at
http://perldoc.perl.org/functions/open.html and let me know if you're having trouble.