Newbie Q: MacPerl / CGI woes

Discussion in 'Perl Misc' started by will@meister.com, Sep 8, 2003.

  1. Guest

    Hi chaps,

    This is a real clueless newbie-type question: my apologies for
    bothering the list, but I've spent some very frustrating hours and
    can't find any appropriate documentation in the primers.

    I'm working with the classic Matt Wright Simple Search CGI, which I
    intend to modify somewhat. Mods are going well, but my ISP is not set
    up for Perl support, so I've installed MacPerl with an old copy of
    QuidProQuo on my own machine on a dummy IP address. Although the CGI
    is working well enough to echo search arguments, I can't get it to see
    the search files.

    Setup is:

    MacHD/QuidProQuo/cgi-bin/search.cgi (location of CGI)

    MacHD/QuidProQuo/herbfinder/*.htm (files I want it to search)

    Configuration is presently:

    $basedir = '../herbfinder/';
    $baseurl = 'http://10.10.10.10/herbfinder/';
    @files = ('*.htm');
    $title = "HerbFinder";
    $title_url = 'HerbFinder';
    $search_url = 'http://10.10.10.10/herbfinder/hf.htm';

    What am I doing wrong? Sorry for tedium of this question.

    Will
    , Sep 8, 2003
    #1
    1. Advertising

  2. <> wrote:

    > @files = ('*.htm');



    If @files contains no elements, then this code will
    have an identical effect:

    $files[0] = '*.htm';

    Where the first character of the filename is an asterisk character.


    > What am I doing wrong?



    I dunno (because you did not show how you are using @files).

    Try expanding the glob:

    my @files = glob '*.htm';


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Sep 8, 2003
    #2
    1. Advertising

  3. <> wrote:

    > This is a real clueless newbie-type question:


    > I'm working with the classic Matt Wright Simple Search CGI,



    Don't do that.

    Crappy code is not a good starting point for beginners (nor experts).


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Sep 8, 2003
    #3
  4. Vlad Tepes Guest

    <> wrote:

    > I'm working with the classic Matt Wright Simple Search CGI, which I
    > intend to modify somewhat. Mods are going well, but my ISP is not set
    > up for Perl support, so I've installed MacPerl with an old copy of
    > QuidProQuo on my own machine on a dummy IP address. Although the CGI
    > is working well enough to echo search arguments, I can't get it to see
    > the search files.


    Don't use Matt's scripts. They contain errors and security holes. Look
    for drop-in replacements made by experts at http://nms-cgi.sf.net .

    The rest of your mail I didn't bother looking at. I'm willing to help,
    but not with scripts Matt Wright himself warns about using.

    Hope this helps,
    --
    Vlad
    Vlad Tepes, Sep 8, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. talisman

    struts validator woes (newbie)

    talisman, Jul 28, 2004, in forum: Java
    Replies:
    0
    Views:
    706
    talisman
    Jul 28, 2004
  2. Golo
    Replies:
    0
    Views:
    106
  3. Nathan Olson

    MacPerl vs. Unix (OS X) Perl

    Nathan Olson, Jul 12, 2004, in forum: Perl Misc
    Replies:
    6
    Views:
    141
    Bart Lateur
    Jul 13, 2004
  4. Replies:
    1
    Views:
    106
    A. Sinan Unur
    Mar 9, 2005
  5. Xiong Changnian

    MacPerl, OS 9, move file to Trash

    Xiong Changnian, Jan 25, 2007, in forum: Perl Misc
    Replies:
    1
    Views:
    141
    Xiong Changnian
    Jan 26, 2007
Loading...

Share This Page