in reply to STUPID STUPID STUPID old me.

I don't know where the semicolons should be in the 'foreach' block. This is my attempt at 'clear' formatting and placing semicolons correctly.

foreach $i (0..$#dir) { if( ($dir[$i] ne "index.html") && ($dir[$i] ne ".") && ($dir[$i] ne "..") && ($dir[$i] ne "cgi-bin") ) {$files = 1}; }
I know that you don't always need a semicolon at the last line of a block, but I don't remember the rules. I'm not sure where to go from here. I'm not even sure that I got the formatting right. :)

Replies are listed 'Best First'.
Re: Re: STUPID STUPID STUPID old me.
by Anonymous Monk on Oct 28, 2002 at 07:49 UTC
    no, the syntax of the script is fine, i ran it through the perl interpreter with the -c flag, the problem has to be something acceptable syntax-wise but bad enough to make the program malfunction.
Re: Re: STUPID STUPID STUPID old me.
by Ananda (Pilgrim) on Oct 28, 2002 at 08:36 UTC
    its a very very STUPID STUPID STUPID feeling to say the code works fine. Andy
      Yup. After I posted that node, I started playing with all of the provided code, looking at the control blocks, trying to find some error. Then I ran it (using -c to check for errors) and found no problems. {shrug} On to the next node.