So after being patronising, what you mean effectively is "Yes, STDOUT is dynamic and if the script is being called via CGI it knows to output to CGI and if being called via command line knows to output to command line".
This is the most helpful forum for Perl I've ever come across but also the one where you're most likely to get a rude, patronising or obnoxious response. As a side note I note that I have been down-voted by several people for simply and clearly expressing my query. For god's sake lighten up, you lot, it's like a convention for manic depressives.