Hello SAWMaster,
Thursday, July 05, 2001, Maxim Berlin <[EMAIL PROTECTED]> wrote:
S>> I'm trying to list all files in a directory EXCEPT the current and
S>> the parent directories.
S>> ie.
S>> .
S>> ..
S>> file1
S>> file2
S>> file3
S>> Is not what I want. I only want:
S>> file1
S>> file2
S>> file3
S>> I thought I had the right code, but I don't.
S>> while($i < ($#filelist))
S>> {
S>> if ((@filelist[$i] ne '.') || (@filelist[$i] ne '..'))
MB> try $filelist[$i]
1. and, what the strange if condition? it is always true.
S>> {
S>> print @filelist[$i];
S>> print "<BR>\n";
S>> $i++;
S>> }
2. you have endless loop here. $i never increment, if 'if
condition' wrong.
S>> }
Best wishes,
Maxim mailto:[EMAIL PROTECTED]