in reply to Re^8: Benchmarking "Are all these characters in this sentence?" (Are you bored yet? :)
in thread Benchmarking "Are all these characters in this sentence?"
Actually, it's your tests that are broken. They assume that the routines will return "0" for false, where as my routines (all of them including buk3 which you said passes all the tests), return undef. And that is where the Use of uninitialized value in numeric eq (==) ... warning message is coming from. Your tests (or test tools) not my code.
The received wisdom is that subs should just return; to indicate false as this will do the right thing when called in both scalar and list contexts.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^10: Benchmarking "Are all these characters in this sentence?" (Broken tests, not code!)
by RMGir (Prior) on Sep 02, 2008 at 11:16 UTC |