Right now I am running a perl script with the -w flag to generate warnings. I am also redirecting the program's output to a text file like so:
test_script.pl > test_output.txt
I am doing this because there is a lot of debug code in my script and the console cannot hold all of it, yet I need to be able to see it all to understand what is going on in my script.
The problem I am having is that warning messages are still going to the console, but not the text file that I redirected the output to. All other program output is going to the text file. How can I redirect the warning messages to the text file as well (and why are they not going there to begin with)? It is impossible for me to debug the program when I cannot see where these warning messages are occurring relative to all of the other debug code in my script.
test_script.pl > test_output.txt
I am doing this because there is a lot of debug code in my script and the console cannot hold all of it, yet I need to be able to see it all to understand what is going on in my script.
The problem I am having is that warning messages are still going to the console, but not the text file that I redirected the output to. All other program output is going to the text file. How can I redirect the warning messages to the text file as well (and why are they not going there to begin with)? It is impossible for me to debug the program when I cannot see where these warning messages are occurring relative to all of the other debug code in my script.