"Nishi Bhonsle" schreef:

> If I need to get the files without the "." and the ".." at the first
> level only, then how can i modify the find command?
> ie
> Currently using  find(sub {push(@new,$_) if ( -f ) }, $path); gives
> me all files under NewDir as well as NewSubDirectory
>  C:\build\Sample\NewDir\File1.txt
> C:\build\Sample\NewDir\File2.txt
> C:\build\Sample\NewDir\NewSubDirectory
> C:\build\Sample\NewDir\NewSubDirectory\11.txt
>  C:\build\Sample\NewDir\NewSubDirectory\12.txt
>
> If I need to get files only under NewDir and then issue another
> command to get files only under NewSubDirectory, then how can i
> restrict the find command to only look for the files under the
> directory mentioned

See `perldoc -f readdir`.

But I would use IO::All
http://search.cpan.org/search?module=IO::All

-- 
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