dchandler has asked for the wisdom of the Perl Monks concerning the following question:
Each webpage I access has a single observation with aproximately, 10 variables. The order of my current script is like so:
1) get the source of a website.
2) use regular expressions to extract relevant values for 10 variables.
3) After extracting EACH variable, write it immediately to a textfile.
4) repeat.
would it be faster to save the ten values to an array and then write the contents of the array to a file? If it's faster to do this for one webpage, would it be faster to create some kind of array of arrays and capture 20 observations * 10 variable values? Supposing that initially, the array approach is more efficient, how can I discover the most efficient array size before writing to text.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: most efficient way to scrape data and put it into a tsv file
by Aristotle (Chancellor) on Aug 29, 2004 at 21:41 UTC | |
by dchandler (Sexton) on Aug 30, 2004 at 05:03 UTC | |
by Aristotle (Chancellor) on Aug 30, 2004 at 10:55 UTC | |
by iburrell (Chaplain) on Aug 30, 2004 at 17:05 UTC |