I want to have any data that would go to STDOUT, STDERR, STDIN to go to a variable.
The short answer: forget it, it doesn't work.
Reason is that when you open a hande to a scalar, you'll get a perl-internal file handle with no associated system file descriptor (fileno() would give -1). And only those file descriptors can be inherited/shared across the fork/exec which is being done behind the system() call. The child process doesn't have access to perl-internal file handles.
In reply to Re: printing to a scalar -- STDIN, STDOUT, STDERR
by almut
in thread printing to a scalar -- STDIN, STDOUT, STDERR
by Jack B. Nymbol
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |