in reply to Re^2: Parsing Large XML
in thread Parsing Large XML
What is an acceptable alternative to $[ ?
Not using it. It adds needless complexity.
If you insist,
can be written as$[ = 1; $a[$i]
use constant BASE => 1; $a[$i-BASE]
At least there's no hidden effect at a distance this way.
Could you suggest a way to print each result as it is found?
To print the results instead of saving them in an array, replace the code that places them in the array with the code that print a match.
for (@stories) { print $fh $_ if /$fields[1]/; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |