In my quest to learn Perl one thing I wish I would have done sooner is learn how to use the debugger. No, not that command-line crap that unix fanatics use. I'm talking about ptkdb.
These past couple of days, I've been working with a colleague who is more of a sys-admin than a Perl guy, but we're collaborating on a project and he needed to continue the portion of code that I had completed. The problem was that I was returning a complex data structure and he was having a hard time visualizing it. The result was that he was getting very confused with hash references.
That's where ptkdb came to the rescue. By putting a watch on the hash structure, he was able to see just how things were laid out. If he was still unsure, he could try to put a watch on a specific variable in the already-populated hash to make sure he was dereferencing correctly, rather than floundering about with print statements and constant restarts.
The only advantage to the command line debugger that I've seen is in dealing with any program that forks, where you can send the output of each child to a different terminal. The ptkdb app seems to flake out with fork calls.
In events completely unrelated to Perl, we had to put down the girlfriend's 19 year-old cat on Thursday. She hadn't been eating well for weeks, slowly but surely losing weight, despite our trying many different kinds of food, and a couple different medicines. We came home Thursday to find that the cat had seemingly lost control of her bowels a little bit, yet was too tired to even do much about it.
It was very quick - an overdose of an anesthetic, the vet said. The girlfriend was crushed - losing the cat she had loved since she was 8 was very, very hard on her. Heck, it was hard on me, too. I stayed with her for the whole thing, and reassured her that it was definitely the right thing to do.
It's been a little weird since then. Not having a cat to greet us when we get home is strange. It's too quiet.