captumring output from STDERR
Hi Everybody,
Well I am writing a perl script and I execute a command. I would like to capture the error messages : Let, @ar = `ifconfig`; One way is : @ar = `ifconfig 2>&1`; this directs error to console STDOUT and thus can be captured by the handle. Can u seggest me another method to achieve the same. Regards, Rajat Garg |
If you want to catch error messages only:
ifconfig 2>>/path/to/some/file The >> might be accessive, a single > should work. |
Is there a reason you don't want to use the normal redirect (2>&1)?
Quote:
|
All times are GMT -5. The time now is 10:31 AM. |