Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Searching a file for an undetermined hexadecimal string

by ChemBoy (Priest)
on May 13, 2005 at 04:32 UTC ( [id://456602]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    undef $/;
    $_ = <>;
    s/(\x31\x33\x39\x37[^\x00]*\x00)/"\x00" x length $1/ge;
    print;
    
  2. or download this
    $/ = \4096;
    my $flag = 0;
    ...
        s/(1379[^\x00]*(\z|\x00))/"\x00" x length $1/ge;
        $flag =  length $2 ? 0 : 1; # this could be readily golfed, I real
    +ize
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-03-28 16:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found