Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Detect STX and ETX hex in received string

by kcott (Bishop)
on Nov 28, 2012 at 07:28 UTC ( #1005970=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    qr{ [$STX] ( [^$ETX]{0,80} ) [^$ETX]* [$ETX] }x
    
  2. or download this
    $ perl -Mstrict -Mwarnings -e '
    my ($STX, $ETX) = (chr(2), chr(3));
    ...
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    +aaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    +aaaaaaaaaa
    1234567890123456789012345678901234567890123456789012345678901234567890
    +1234567890
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2019-11-19 20:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Strict and warnings: which comes first?



    Results (96 votes). Check out past polls.

    Notices?