Ex: perl -d:Trace testScript.pl > output.log
Q:1 The traces are not redirected to the output.log file.
How to redirect the trace.
Q:2 Is it possible to trace the script only as in the trace it goes into the module too used in the script. Can we trace one or two level only.
Thanks.
A:1 The traces are redirected by default to the stderr stream.
To log to stderr (in general in Linux), you do the following:
Where &2 equates to stderr, &1 is stdout (i.e. printf debugging), and both would be just &
I am not sure about A:2.