Before I consider posting to Perlmonks (or bothering co-workers ;) ) I always try to write a smaller program that illustrates my problem. I give it the data (hardcoded where possible) that I expect to get (or to compare with the data I expect from my code) and work from there.
This allows me:
Controlled space where I can experiment
Clean brain space to concentrate on the problem
Knowledge that I can't break anything
I can have finer control over running the test area