http://www.perlmonks.org?node_id=397207


in reply to Dynamic Directory Index help

you are missing a bunch of variable names. Every time you see my there should be a variable name following. For example:
my ="/usr/local/apache/htdocs/projects/"; my ="http://mattwork.potsdam.edu/projects/";
should look like this line does
my @dirs=readdir PRJD;
add the following to the top of your script and you will get more helpful error messages
#!/usr/bin/perl use warnings use strict
check out this book (Learning Perl) by our own merlyn for a good place to start with perl.

Replies are listed 'Best First'.
Re^2: Dynamic Directory Index help
by Anonymous Monk on Oct 07, 2004 at 02:42 UTC
    Thanks for your reply. I have my output here:
    [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] Unquoted str +ing "sh" may clash with future reserved word at /www/cameo/htdocs/ind +ex.pl line 8. [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] Unquoted str +ing "sh" may clash with future reserved word at /www/cameo/htdocs/ind +ex.pl line 25. [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] Unquoted str +ing "sh" may clash with future reserved word at /www/cameo/htdocs/ind +ex.pl line 26. [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] Backslash fo +und where operator expected at /www/cameo/htdocs/index.pl line 30, ne +ar ""<a href=\\$ [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] \t(Missing o +perator before \\?) [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] syntax error + at /www/cameo/htdocs/index.pl line 4, near "my =" [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] syntax error + at /www/cameo/htdocs/index.pl line 17, near "my =" [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] syntax error + at /www/cameo/htdocs/index.pl line 27, near "my =" [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] syntax error + at /www/cameo/htdocs/index.pl line 30, near ""<a href=\\ "\\" [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] Execution of + /www/cameo/htdocs/index.pl aborted due to compilation errors. [Wed Oct 06 09:53:06 2004] [error] [client 192.168.2.254] Premature en +d of script headers: index.pl
    Do you know which varibles I would need to have? I am not a coder at all. I try but just never grasped it.