For logging, and debugging, I often need to print something where I don't really know what it is or whether it's defined. I want to print it in such a way that I can always tell from the output. I don't need the full value (for complex structures).
This seems like such a common need, I'm a little surprised I haven't found anything that does it. Does anybody else have this problem? Is there a solution?
(The aspect that burns me most frequently is an undef variable blowing up the print; I want it to just say "undef" or something. Trying to suppress writing requirements, in hopes of finding something in existence.)
In reply to "Safe" print? by dd-b
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |