Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Argument "" Isn't numeric in numeric eq (==)

by Kenosis (Priest)
on Feb 09, 2014 at 22:02 UTC ( #1074167=note: print w/replies, xml ) Need Help??


in reply to Re: Argument "" Isn't numeric in numeric eq (==)
in thread Argument "" Isn't numeric in numeric eq (==)

The OP's code answers these questions.

Given the OP's dataset:

1,1,,,, 1,2,,,, 3,4,1,1,, 1,1,1,1,, 5,6,3,4,1,2 1,1,,,, 1,1,1,1,1,1

the code indicates that "Success" obtains when at least one of the following tuples is '1,1' and "Fail" obtains when one is '1,2':

(n,n),(n,n),(n,n) ^ ^ ^ | | | | | + - Tuple 3 | + - Tuple 2 + - Tuple 1

Edit: Added the "Fail" condition. Thank you, Jim.

Replies are listed 'Best First'.
Re^3: Argument "" Isn't numeric in numeric eq (==)
by Jim (Curate) on Feb 10, 2014 at 00:04 UTC

    Read the OP again. There's both a "success case" (1,1) and a "fail case" (1,2), and they're independent. There's nothing in the specification of the problem that precludes the possibility of both a success case and a fail case in the same three-tuple record. As it happens, there isn't an example in the OP of a record that has both a success case and a fail case in it. So the record ,,,,, has neither a success case nor a fail case in it, and the record 1,1,1,2,1,2 has one success case and two fail cases in it. However, the specification is to count the number of records that have success cases and fail cases in them, not the number of such cases.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1074167]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2021-02-24 23:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?