in reply to Modules to handle backticks?
Quoting from perlop ...
This works for me, on WinXP, as in the example below.qx/STRING/ ... To capture a command's STDERR and STDOUT together: $output = `cmd 2>&1`;
HTH#!/usr/bin/perl use strict; use warnings; printf STDERR "1 stdout: %s\n\n", ` p4 change -o 43026 `; printf STDERR "2 stdout: %s\n\n", ` p4 change -o 143026 `; printf STDERR "3 stdout+stderr 2>&1: %s\n\n", ` p4 change -o 143026 +2>&1 `; __END__ # typical output on my machine # 1 stdout: # A Perforce Change Specification. Change 143026 unknown. 2 stdout: 3 stdout+stderr 2>&1: Change 143026 unknown.
|
|---|