[EMAIL PROTECTED]]
> Sent: Thursday, July 05, 2001 3:58 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Parent and Current Directories
>
>
> Hello SAWMaster,
>
> Thursday, July 05, 2001, SAWMaster <[EMAIL PROTECTED]> wrote:
>
> S> Hello group!
>
> S> I
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>
On Thu, Jul 05, 2001 at 02:43:01PM -0500, SAWMaster wrote:
> Hello group!
>
> I'm trying to list all files in a directory EXCEPT the current and the parent
>directories.
>
> I thought I had the right code, but I don't.
>
> while($i < ($#filelist))
> {
> if ((@filelist[$i] ne '.') || (@file
On Jul 5, SAWMaster said:
>while($i < ($#filelist))
>{
>if ((@filelist[$i] ne '.') || (@filelist[$i] ne '..'))
>{
>print @filelist[$i];
>print "\n";
>$i++;
>}
>}
The chief problem is your logic.
if ($f ne '.' || $f ne '..') {
print $f;
}
When '.' get
Hello SAWMaster,
Thursday, July 05, 2001, SAWMaster <[EMAIL PROTECTED]> wrote:
S> Hello group!
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> file
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 '.') || (