Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Newbie Q: MacPerl / CGI woes

Reply
Thread Tools

Newbie Q: MacPerl / CGI woes

 
 
will@meister.com
Guest
Posts: n/a
 
      09-08-2003
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
 
Reply With Quote
 
 
 
 
Tad McClellan
Guest
Posts: n/a
 
      09-08-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> 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
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
 
 
 
Tad McClellan
Guest
Posts: n/a
 
      09-08-2003
(E-Mail Removed) <(E-Mail Removed)> 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
(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
Vlad Tepes
Guest
Posts: n/a
 
      09-08-2003
(E-Mail Removed) <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MacPerl, OS 9, move file to Trash Xiong Changnian Perl Misc 1 01-26-2007 01:12 AM
Apache 2.2 and dispatch.cgi woes Golo Ruby 0 09-05-2006 01:01 AM
Advice for moving linux script to MacPerl ecurts@neo.rr.com Perl Misc 1 03-09-2005 06:53 AM
MacPerl vs. Unix (OS X) Perl Nathan Olson Perl Misc 6 07-13-2004 10:02 AM
Re: CGI Perl "use CGI" statement fail Jürgen Exner Perl 0 07-31-2003 02:00 PM



Advertisments