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

Re: [MacPerl] JavaScript Array to MacPerl



Jeff at MacTech <online@mactech.com> wrote:

>As I had imagined, the syntax for this array is very similar to the Perl
>syntax. This is sort of a strange way to go about it, but I have a
>suggestion to get you started. This assumes that the above array is in a
>text file, and it is the only thing there. (So you may need to modify as
>necessary):

Jeff--

This is indeed VERY helpful.  However your assumption that the array is 
the only thing in the text file is, sadly, wrong.  There's another array 
in the file, which preceeds this array (I may have mentioned  this in my 
intial post).

The first half of the file looks like:
-------------------------------------
       prefix="http://www.mycoinfo.com/"

       arURL = new Array(
         "news.html#taxonomy-meeting-kew",
         "trametes.html",
 ...[snip]...
         "GCanSci.html",
         "GCanSci-Tshirt.html",
         "downloads/thesis.html"
       )
-------------------------------------

The actual contents of these arrays get changed on a regular basis, and 
for the current purposes this first array can be ignored.  The two arrays 
have the same number of elements.

Would you use unless() or until() to loop through the input @lines and 
throw away what we don't need?


# Fungal Parataxonomy                   Mycology Information (Mycoinfo)
# Webmaster, Staff Writer      **The World's First Mycology E-Journal**   
# <mailto:webmaster@mycoinfo.com>            <http://www.mycoinfo.com/> 
# "A couple of guys trying to do something great..."



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