in reply to Why is /o not listed as a modifer
I just learned a tough lesson with /o:
I had a subroutine that loops through a given list of files, slurping each file and splitting it with a RE/o; and processing each chunk.
Later I had to support files of a different format. In a test, the above routine worked fine, I just had to pass it a different RE.
But when I put the two subroutine calls together, the second one failed...
My mistake was thinking that RE/o was compiled once in its narrowest scope - that the subroutine could process 1000 files with one fixed RE, and then process another 1000 files with a different RE.
I hope I explained that well; it took me a while to figure it out!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Why is /o not listed as a modifer
by ikegami (Patriarch) on Dec 18, 2008 at 21:58 UTC |