Hello group!
I'm trying to list all files in a directory EXCEPT the current and the parent
directories.
ie.
.
..
file1
file2
file3
Is not what I want. I only want:
file1
file2
file3
I thought I had the right code, but I don't.
while($i < ($#filelist))
{
if ((@filelist[$i] ne '.') || (@filelist[$i] ne '..'))
{
print @filelist[$i];
print "<BR>\n";
$i++;
}
}
I was thinking, maybe it's not equal to . and .. because of a newline at the end of .
and .. ?
But I tried a chop, or chomp and it just took off the last letter of all files,
problem unsolved.
Can someone steer a newbie in the right direction again?
-Dave