good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Review of my scriptby Tux (Canon) |
on May 16, 2013 at 12:10 UTC ( [id://1033821]=note: print w/replies, xml ) | Need Help?? |
Error messages should go to STDERR, Log to the log or STDERR if no log wanted/specified, and required/expected output to STDOUT. If you read that again, an expected usage message is something you want on STDOUT. e.g. when called with --help. My approach is always:
As not all programmers are clean in that distinction, when I want help through a pager, I pipe STDOUT and STDERR together, which - in (t)csh is just a single extra character:
To return to the first point, when some script/app deals with lot of data, you absolutely want that separated! You want to see the analysis, and not store it between your data
Imagine the validity of the generated file if the diagnostics were sent to STDOUT. And imagine the extra time it takes to wade through all the lines to find those messages. Enjoy, Have FUN! H.Merijn
In Section
Seekers of Perl Wisdom
|
|