Re: Help with find text command
Re: Help with find text command
- Subject: Re: Help with find text command
- From: Philip Aker <email@hidden>
- Date: Sun, 05 Aug 2007 07:10:12 -0700
On 2007-08-04, at 17:17:49, Mark J. Reed wrote:
For the record, I think this is a silly exercise, but OK, Perl is
attached.
Well, neither I, nor obviously William Wallace think not. For one
thing, if you eliminate the hyphens from an ISBN-13 and then put them
into a link <http://www.google.com/search?q=ISBN-13:+978-0130603111>
(like the second trumped up ISBN mapping output in the test), a
google shows results.
But thanks a lot for the examples.
Note that there are some weird artifacts in the HTML generated by
your Tcl (extraneous leading whitespace that comes from the
formatting of the Tcl code itself, for instance), but I managed to
replicate all of them in the Perl so the output file was exact.
I believe I've corrected those now and made a few small tweaks in the
perls so the output is a match. The isbn.pl and isbn.tcl are now
single pass versions and the others are the 1000x versions.
So the Perl is about 5x faster than the Tcl.
Well, I didn't get that result OMM. However perl was consistently
~2.25 times as fast on the 1000x and consistently ~1.6 times as fast
on the single pass.
Interestingly, when I tried to optimize the Tcl by proceeding
paragraph by paragraph instead of regsubbing the whole text for the
replacements, there was no improvement. Although I suspect, this
would change with huge input.
The updated files are at: <http://homepage.mac.com/philip_aker/dl/
code/TestISBN.zip>
Philip Aker
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden