Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
"be consistent"
 
PerlMonks  

Re: read string (which is in binary) and make decision

by rjt (Chaplain)
on Nov 17, 2012 at 13:32 UTC ( #1004311=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (<DATA>) {
        my ($test, $_) = /^(.+?):\s?([01]+)$/
            or do { warn "Line $. is invalid: $_"; next };
    ...
    test 4: 1111111000
    test 5:10001001110000011
    ..... so on 
    
  2. or download this
    test 1 000000: PASS
    test 2 111111: PASS
    test 3 000011111: CLEAN
    test 4 1111111000: CLEAN
    test 5 10001001110000011: FAIL
    Line 6 is invalid: ..... so on
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2014-04-20 22:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (488 votes), past polls