in reply to Re^4: Benchmarking "Are all these characters in this sentence?"
in thread Benchmarking "Are all these characters in this sentence?"

I think this is the last :)

buk4 => sub { ( -1 == index $_[0], chop $_[ 1 ] ) || return for 1 .. length +$_[ 1 ]; 1; },

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."
  • Comment on Re^5: Benchmarking "Are all these characters in this sentence?" (Are you bored yet? :)
  • Download Code

Replies are listed 'Best First'.
Re^6: Benchmarking "Are all these characters in this sentence?" (Are you bored yet? :)
by RMGir (Prior) on Sep 01, 2008 at 18:35 UTC
    I doubt it - I'm guessing you're going to post buk5 which passes the tests, because buk4 doesn't :)

    Mike
        The benchmarks run whether the code is right or not.

        To see the tests run, pass a -t argument:

        $ perl timeSentenceChars.pl -t
        ... other tests ....
        Testing buk4
        not ok 77
        #   Failed test in timeSentenceChars.pl at line 103.
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 78
        #   Failed test in timeSentenceChars.pl at line 103.
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 79
        #   Failed test in timeSentenceChars.pl at line 103.
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        ok 80
        ok 81
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 82
        #   Failed test in timeSentenceChars.pl at line 103.
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 83
        #   Failed test in timeSentenceChars.pl at line 103.
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        ok 84
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 85
        #   Failed test in timeSentenceChars.pl at line 103.
        ok 86
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 87
        #   Failed test in timeSentenceChars.pl at line 103.
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        ok 88
        ok 89
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 90
        #   Failed test in timeSentenceChars.pl at line 103.
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 91
        #   Failed test in timeSentenceChars.pl at line 103.
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        ok 92
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 93
        #   Failed test in timeSentenceChars.pl at line 103.
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        ok 94
        Use of uninitialized value in numeric eq (==) at timeSentenceChars.pl line 103.
        not ok 95
        #   Failed test in timeSentenceChars.pl at line 103.
        
        

        Mike