|
|
| Don't ask to ask, just ask | |
| PerlMonks |
Re: Check for data in arrayby thezip (Vicar) |
| on Feb 08, 2012 at 15:28 UTC ( #952520=note: print w/ replies, xml ) | Need Help?? |
|
If I find that something that "something absolutely *should* work", yet doesn't, I create an override for the data by replacing the normal input with hardcoded values that test all possible conditions. For example, just before entering into the "if" statement, hardcode %sections to contain:
If the successful hardcode fails, then you have half-split the problem to determine that your logic is incorrect, rather than the data than is being supplied to it. If it works as expected, then your data is the problem. Pretty basic stuff, but tricks like this allow you to remove all assumptions about the data you think you are processing. What can be asserted without proof can be dismissed without proof. - Christopher Hitchens, 1949-2011
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||