in reply to Re^2: search binary file
in thread search binary file

By ^A do you mean Control-A (i.e. chr(1)?

If so, use this:

if ($input =~ m/(data\x1)(\d+)\x2/) { print "1 = $1, length = ", length($1), "\n"; print "2 = $2\n"; }

Replies are listed 'Best First'.
Re^4: search binary file
by perlfan99 (Sexton) on Jul 11, 2008 at 22:23 UTC
    yes ^A means ctrl-A, thanks superdoc, your tip works