Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: while loop on binary : \x30

by sphalaris (Novice)
on May 17, 2016 at 06:14 UTC ( [id://1163182]=note: print w/replies, xml ) Need Help??


in reply to while loop on binary : \x30

Many thanks for the prompt replies.
Yes, I can avoid a "while" loop by using "split", and that solves the problem as far as my script goes. Hopefully, I must say, because as someone said in these pages once, dealing with binary data can cause acute pains in the head.
I notice that it doesn't have to be a binary string: a simple text string ending in a zero, or consisting only of a zero will not make the character available in the while loop. This is for me in certain contexts a problem. For the future I must avoid using 'while' to munch a string.

Replies are listed 'Best First'.
Re^2: while loop on binary : \x30
by beech (Parson) on May 17, 2016 at 07:50 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 21:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found