in reply to Getting rid of extra outputs
If you are calling it like this
my $cmd = 'ls'; my $result = `$cmd`;
..then consider the following approach:
my $cmd = 'ls 2>&1'; my $result = `$cmd`;
The purpose of the 2>&1 is to take anything output to STDERR and redirect to STDOUT.
This will be of no use if your script is on a Win32 machine.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting rid of extra outputs
by sandrider (Acolyte) on May 27, 2005 at 07:57 UTC | |
by muntfish (Chaplain) on May 27, 2005 at 11:02 UTC |