On Thu, Apr 25, 2002 at 02:49:16PM -0400, Jason Frisvold wrote: > Judging from the subject lines coming across the list today, I think I'm > gonna toss this question out there and then duck and cover... :-) Hmm, I can't see any obvious reason to flame that post. It's a technique and style question that looks perfectly valid to me. > I have 2 actual questions. I'll try to be as specific as possible.. > :-) > > Question #1. I always stumble over that myself, and have no valid solution up to now. I was always thinking about having a special perl binary compiled wqith -DDEBUGGING for that, but never too the time to really try that. Look at 'perldoc perlrun' and search for -Dletters or -Dnumber to see what I'm talking about. > Question #2. > > Relating to the debugging, there are several instances where I have > variables that are only defined based on the definition of other > variables that exist elsewhere. Kind of like : > > sub dummy { > if ($a == 10) { my $b = 0; } > } > > $b is a local variable, so whenever the subroutine is exited, $b > vanishes into the ether. The problem is that I have $b in several debug > statements because I want to see it when it's used, I don't understand your problem here. If you want to see the debugging output where it's used, then your debug statement should be near where $b is used - speak inside the scope of $b - so $b would be declared, and thus no warning. Or do you have one FAT debugging statement at the end of your function? But that wouldn't give you the information you needed anyway. -- If we fail, we will lose the war. Michael Lamertz | +49 221 445420 / +49 171 6900 310 Nordstr. 49 | mike@lamertz.net 50733 Cologne | http://www.lamertz.net Germany | http://www.perl-ronin.deThread Previous | Thread Next