It's been nearly ten years since I've said anything here. Somehow, this seems appropriate.
I, as many perl hackers have, tend default to quick "print" statements for debugging, only to be shot down when throwing my code at, say, multiple input files at once, for example. No longer.
Sure, your code works for *most* of the files, but something is twitchy somewhere. Unicode when you expected ASCII. A mix of LF/CRLF line endings. CR line endings (horrors!) even :)
But: if you print where you think things are going wrong, that output goes in the STDOUT queue. The errors that pop when things go wrong happen in the STDERR queue. Hence, "warn" is your bestest friend evars! Trust me on this. You'll get all sorts of win using "warn" context points when you want to debug via print-ing.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: "warn" is your best friend
by kcott (Archbishop) on Mar 23, 2014 at 05:37 UTC | |
Re: "warn" is your best friend
by moritz (Cardinal) on Mar 23, 2014 at 08:02 UTC | |
Re: "warn" is your best friend
by Bloodnok (Vicar) on Mar 23, 2014 at 12:08 UTC | |
by tobyink (Canon) on Mar 23, 2014 at 14:39 UTC | |
by Bloodnok (Vicar) on Mar 23, 2014 at 21:58 UTC | |
by tobyink (Canon) on Mar 24, 2014 at 12:45 UTC | |
by Bloodnok (Vicar) on Mar 24, 2014 at 14:25 UTC | |
| |
Re: "warn" is your best friend
by GrandFather (Saint) on Mar 25, 2014 at 00:55 UTC | |
by bigj (Monk) on Apr 07, 2014 at 02:20 UTC | |
by Anonymous Monk on Mar 30, 2014 at 20:13 UTC |
Back to
Meditations