in reply to Reading through a file and checking for a specific string
I'd suggest putting in a print statement to show the values as you process them. For example, just after extracting your small string, you could print the line number, the bit you extracted and the complete line:
$var = substr($str, 41, 2); print "$.: $var: $str\n";
Then make a small test file, and run your code against the small test file to see if you get what you're looking for. That ought to help you find the problem in short order.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Reading through a file and checking for a specific string
by vihar (Acolyte) on Aug 19, 2013 at 20:17 UTC |