hi,
I have a script as below
test.pl
system("ls test.pl>output"), this will write the result to a file output.However if the command fails it throws the error on the screen. How can we redirect the error to a file. I need to redirect both success & failure log in a file
[Linux ~]$ perl test.pl
ls: est.pl: No such file or directory
[Linux~]$
Any help or pointers will be helpful.
Thanks