in reply to Parsing and \G and /g and Stupid User Tricks
Okay, I must be missing something big. You appear to be using $dpf alternately as a file handle (to read()) and as a string (something that you can match regular expressions against). You can't match a filehandle against a regular expression (unless I've missed a major added feature). If you don't pass an argument to pos(), then it works on $_, which you never use anywhere else in your program. I don't see how this can work at all!
I suggest you read the entire contents of the file into a single string and do your processing on the string. Then you won't need \G nor .*.
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Parsing and \G and /g and Stupid User Tricks: $fileHandle =~ m//g;: v2
by THuG (Beadle) on Aug 08, 2000 at 20:10 UTC | |
by tye (Sage) on Aug 08, 2000 at 20:31 UTC |