If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Script to search cgi-bin

Looking for a perl script which will do word or string search in my cgi-bin,
which has over a dozen folders plus 3 dozen files not in folders.
Simple script, simple html, webmaster use only.
Have one that does not function, worn out attempting to edit.
thx
Mike

Since the script I have does not work, I thought that I might find a kind soul that knew of a cgi-bin search script that does work, rather than continue to struggle with the unsatisfactory one.
BTW, I searched the CF archives, not cgi specific scripts.
The script I've installed returns a "no results" message, appearing to operate normally, i.e. no error msg's etc.
Don't know what which part is not written properly...
Will dig it out tho for inspection,
thx

I don't know of a prewritten script that does what you want. You'll probably need to fix the script you currently have, or start over with a new one. I willing help either way, but not write it for you.

Hello Fishmonger!
I'm wondering whether to keep the coding forum site open --
Should I go ahead and close the window and look for an eMail when/if you find it convenient to fiddled with my inquiry?
thx, Mike

Sorry for the delay in responding, I've been tied up on a major project at work which won't be completed for another week or so.

Your script has numerous problems, most of which I don't have time to go into now.

To start with, ALL Perl scripts should begin by loading the strict and warnings pragmas. Those 2 pragmas will point out lots of coding mistakes which could be difficult to track down without their help.

You should not manually parse the form submission. Instead, use the CGI module and let it do the parsing to make sure it's done correctly.

Since you're wanting to traverse a directory tree, you should use the File::Find or File::Find::Rule module to find and process the files.

Users who have thanked FishMonger for this post:

Hi FM!
Dident mean to complain, appreciate your kind attention!
Thx for the base skeleton of the script.
I've waited to reply as UR busy.
Don't have desire to keep/use the script I found somewhere,
and will be grateful for your help on this new one as it looks like I'm out of my (shallow) depth here.
I will flail away at the html page and flounder around the script, not sure about the sub dir defs.....
thx again for your effort and hope you may find a convenient moment to flesh out this skeleton
Mike