[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Mac to Unix & back?



Listers,

Many thanks for the replies.  I won't be able to reply to all of them
individually but please continue to send suggestions at least to me if not
the list (I've gotten about 20 so far).  Monday, I'll write a summary of
all the replies (sounds almost like an FAQ starter kit to me).  I'll also
be passing along the script as I think it will be useful to others once it
is working 100%.

Description of script follows for those interested:

Website contains:

1. Approximately 1000 primary pages which previously used active server
pages (script called lookup.asp -- obviously not on Unix).  This size could
be larger and still be quite useful.
2. 466 definitions pages (in a seperate directory) which were found by the
lookup.asp script in a glossary.  This could also be very large and still
useful.
3. The lookup.asp
4. a Glossary page in HTML with relative links to all the definitions pages
which was searched by the lookup.asp script.  example: <a
href='glossary/w24.html'>CASE</a><br>

What it's used for:

Each of the primary pages would point to the lookup.asp as <a href =
"lookup.asp?CASE">CASE</a> for the example above rather than have a link to
the page.  The advantage to this is that if you renamed a page or added a
page, you only had to change the glossary entry.

They've since moved this to a Unix Box which won't do ASP and needed a
solution that would work in it's place.  I've since created a sample page
with about 20 links, a form for searching the glossary (currently includes
conditional and/or search, matches exact/contains/starts with, and case
sensitive/insensitive switchs), a script to change pages as needed from
lookup.asp to lookup.cgi, and the script in question.

In the case of a link, it will obviously only find one definition in the
glossary in which case the user is redirected to that page.  Same applies
for the form if only one definition is found.

If zero pages are found (whether from a link or form, the user is sent an
error message with the form telling them so and allowing to try again.

If more than one definition is found then a page is built which contains
links to each definition and that's sent to the user.  I wanted to build a
page which contained all the relevant definitions but the client didn't
like the idea.

This is only about my fifth script so I'm sure it could be optimized -- but
everything currently works except the and/or search (which I'm finishing up
now) and is reasonably fast on a Mac with just the personal web sharing
turned on.

me

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Dennis Little			       mailto://dennis.j.little@lmco.com
Lockheed Martin Missiles & Space       mailto://metnet@worldnet.att.net
Sunnyvale, CA			       Web: http://www.lmms.lmco.com/
Phone: 408/756-2170		       LMMS: O/EA52 B/076 C/3E8
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch