Mathew Snyder schreef:

> Did a bit o' Googling and found how to use the 'not' operator and now
> have this line that eliminates the . and .. while still populating the
> array in as few lines as possible:
>
> @filenames = sort grep { !/^\.$|^\.\.$/ } readdir $dh;

Yes, but that still doesn't filter out any other directory names inside
the directory that you are processing.


Alternative:

  @filenames = sort grep -f "$processDir/$_", readdir $dh ;

-- 
Affijn, Ruud

"Gewoon is een tijger."



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to