Gohaku wrote:After using backticks to retrieve executable output, I would like to know if there is a backtick alternative.
Try this.... local *CMD; $cmd = "dir"; open(CMD,"$cmd 2>&1|")|| die "Could not open file handle\n"; while(<CMD>) { print $_,"\n"; } close(CMD) || die "Could not close $cmd $!\n";
The program is printing to STDOUT.
Hmm.. Is there any situation when it's motivated to do that instead of using backticks (or the qr// operator)?
-- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi-bin/contact.pl
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>