in reply to Searching in binary files
What do you actually want to do? Check that the string exists? Count the number of occurences? Find a string that matches some pattern? Find a prefix string and extract some trailing text?
A neat way to perform some of those searches is:
local $/ = "the string to match"; while (<fileHandle>) { #do stuff with the "line" in $_ #chomp will remove "the string to match"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Searching in binary files
by BrowserUk (Patriarch) on Dec 15, 2005 at 05:56 UTC |