|go ahead... be a heretic|
Easy, elemental, but cool debug trick.by jjhorner (Hermit)
|on May 24, 2000 at 21:17 UTC||Need Help??|
I have a co-worker who is a long-time C coder. He showed me a trick that I should have thought of a long time ago, but never occurred to me.
I use it often now and it simplifies things greatly.
At the head of a script, I add the line:
and after a variable should gain a new value, I add:
This helps me make sure my variables are given the values that I want. When I want the text to run without the extra mess, I change $DEBUG to 0.
Anyone else have any neat practices that keep them honest, besides using 'strict' or '-w'?