After your code acts upon the first HTML file, do you ever reset $ch_count to zero, or does it keep on getting incremented larger and larger with each subsequent file? The code snippet you've provided doesn't tell us that. Also, is $ch_count starting out being undef initially?
In particular, the first scenario could get you into trouble. If you're acting upon multiple files, and $ch_count has grown to some value that exceeds the length of the postmatch string, you've got a problem.
Dave
In reply to Re: Substr warning
by davido
in thread Substr warning
by New Novice
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |