in reply to Win32 Word behaving strangely
This construct in MS-Word is not an array-like access, but rather it goes every time from 1 to $i to access $i-th element
This gives access time O(N) instead of O(1), and your loop O(N^2), which is bad.
Plus you use this several times in a loop.
A typical workaround - use something like that:
use Win32::OLE qw(in); @items = in $doc->Words->Items;
Been there, seen that :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Win32 Word behaving strangely
by cormanaz (Deacon) on Jul 28, 2006 at 20:48 UTC | |
by vkon (Curate) on Jul 28, 2006 at 21:19 UTC | |
by vkon (Curate) on Jul 28, 2006 at 21:07 UTC |