in reply to Dynamic Directory Index help

Did you cut-and-paste exact code, or did you retype the whole thing? Many of the lines of code you posted would never even compile.

If that's the code you downloaded, it's beyond repair.

My recommendation is to buy a copy of "Learning Perl", published by O'Reilly & Associates and read it thoroughly. Also read perlintro. And don't bother with this script, just start over once you've read those. If it were just one buggy line or two that would be different, but most of the lines of code you presented contain problems.


Dave

Replies are listed 'Best First'.
Re^2: Dynamic Directory Index help
by Anonymous Monk on Oct 07, 2004 at 03:00 UTC
    I got this code from this website: here

      The engine they used to post the code on the website has destroyed the code. All the variable names are gone. You could put it back together from the article if you were patient.

      If you simply make the directory world readable then apache will give you a much nicer listing.

      chmod 755 /home/you/public_html/somedir/

      cheers

      tachyon

      You are right, that website's code is messed up. I contacted the author , and while I normally wouldn't publically post a private email, the response I received was courteous, prompt, and positive, so with names removed I think it will be ok:

      Hi David,
      I'm answering this query on behalf of (the author) who is unavailable at the moment.

      >><snip>
      >> Someone just posted a question on www.perlmonks.org asking why it
      >> wouldn't work. ...how COULD it work, where all variable names
      >> have been stripped?

      Thanks for your feedback - you're right, there appears to have been some kind of formatting error here.

      We're trying to fix it right now, and I'll let you know once it's done.

      I wonder what wrecked it. Perhaps it was a spell checker or something like that. Anyway, it appears that bart has taken the time to fix it for you, and in fact, it looks like he has improved upon the original script, so I would use his example below. ++bart. :)


      Dave