in reply to RE: RE: RE: RE: RE: Re: Inputing info into Nested Arrays
in thread Inputing info into Nested Arrays

She-Wolf

Try this URL: A HREF = "http://webreview.com/pub/98/10/23/perl/index.html">http://webreview.com/pub/98/10/23/perl/index.html

It's an online, text based database that you can download and reconfigure fairly easily. The text is tab delimited. You can search on the various fields. If necessary, you can have links between different text databases, simply by setting up the appropriate CGI scripts.

Individual records are parsed into an array, whose elements can be printed into a table individually (eg some as plain text, some as hyperlinks).

I've used it in the past, so I'm reasonably familiar with it if you want to use it. It would at least give you an idea as to where to start.

MadraghRua
yet another biologist hacking perl....

  • Comment on RE: RE: RE: RE: RE: RE: Re: Inputing info into Nested Arrays

Replies are listed 'Best First'.
RE: RE: RE: RE: RE: RE: RE: Re: Inputing info into Nested Arrays
by She-wolf (Sexton) on Aug 22, 2000 at 02:22 UTC
    I'm just curious as to whether or not you've found his use of reserved words for variables a problem when using this program.

    Also, I was just wondering if you've had any problems using this application.

    She-wolf
    "Wha? I don't get it."

      The function reserved_word is different to $reserved_word and @reserved_word. The use of $, @, or % means that they don't conflict with reserved words. What you do have to watch out for are conflicts with nonvariable identifiers such as labels and filehandles. Usually these last two are all in UpperCase, as in his script.

      If you are truly uncomfortable and want to avoid using reserved words in variable names, you could simply globally change the variable names.

      No, the script worked pretty much straight out of the box. What did cause some amusement was forgetting to include all the pipes in the text delimited file - that one caused a deal of amusement until it was caught.

      The only other thing that caused some difficulty was using the GUI front end to load and edit data - this was sometimes very slow and I'm not sure why, perhaps something to do with the file locking mechanism.

      MadraghRua
      yet another biologist hacking perl....

RE: RE: RE: RE: RE: RE: RE: Re: Inputing info into Nested Arrays
by She-wolf (Sexton) on Aug 22, 2000 at 00:24 UTC
    Have you had a problem with:
    Can't find string terminator "HTML" anywhere before EOF at database.cgi line 135. ?

    She-wolf
    "Wha? I don't get it."

      You must be using a heredoc and not be properly ending it.

      print<<HTML; Your HTML HTML

      Cheers,
      KM

        print<<HTML; <HTML><HEAD><TITLE>Add a Record</TITLE></HEAD> <BODY BGCOLOR="#FFFFFF"> <CENTER><FONT SIZE=5 FACE="ARIAL"> Add a Record </FONT></CENTER> <P> <FORM ACTION="$form_action?$config" METHOD=POST> <CENTER><TABLE BORDER=1 CELLSPACING=0> HTML

        She-wolf
        "Wha? I don't get it."

      Actually, no I haven't. Could you please send me the top part of your database file and I'll look at it on my own system. This will probably be a bit faster. Just make sure that you include your header fields...

      kpclancy@hotmail.com

      MadraghRua
      yet another biologist hacking perl....

      Two other questions - what is your OS and what version of Perl are you using? If you're using Windows, which one and what type of perl - ActiveState?

      MadraghRua
      yet another biologist hacking perl....