Yoshiro has asked for the wisdom of the Perl Monks concerning the following question:
Greetings Monks
I am stuck with another problem working with server. I'm making a cgi script to search for a word in html files located within my server file structure.
Im using the xampp 1.7.7 running Apache. In my htdocs directory i created a new one called 'myDir' in which i will have a few html files. I am trying to create a cgi script in which i use file::find. I read the cpan article and i understand that since i'm doing the search in one specific directory i need to replace the @directories_to_search array with just my directory name so it looks like this:
find(\&wanted, '/myDir/');The problem is that when i use the full disk path the script finds the files but not when i use the short localhost path as shown below:
find(\&wanted, 'C:/xampp/htdocs/myDir/');examples below don't find anything, as the variable $File::Find::name doenst return anything
find(\&wanted, '/myDir/'); find(\&wanted, 'http://localhost/myDir/'); find(\&wanted, 'http://localhost/htdocs/myDir/');Thank you in advance,
Yoshiro
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: file::find usage with apache question
by Corion (Patriarch) on May 08, 2012 at 11:29 UTC | |
by aaron_baugher (Curate) on May 08, 2012 at 12:37 UTC | |
by Corion (Patriarch) on May 08, 2012 at 13:43 UTC | |
by aaron_baugher (Curate) on May 08, 2012 at 22:57 UTC | |
by Yoshiro (Novice) on May 08, 2012 at 16:11 UTC | |
by tinita (Parson) on May 09, 2012 at 10:39 UTC | |
| |
by Yoshiro (Novice) on May 08, 2012 at 12:27 UTC |