Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Re: Searching a file for an undetermined hexadecimal string

by ChemBoy (Priest)
on May 13, 2005 at 04:32 UTC ( #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? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2023-02-07 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I prefer not to run the latest version of Perl because:







    Results (40 votes). Check out past polls.

    Notices?