xsize 0 Report post Posted October 20, 2004 My 3th Perl ProgrammThe current dir show... [br]#!/usr/local/bin/perl[br][/br]# dir path [/br]$sdir='.';[br]opendir(DIR,$sdir) || die "can't opendir $some_dir: $!";[/br]@dots = grep {-d "$sdir/$_"} readdir(DIR);[br]rewinddir(DIR);[/br]@fils = grep {-f "$sdir/$_"} readdir(DIR);[br]foreach (@dots){[/br] print "$_\n";[br]}[/br]foreach (@fils){[br] print "$_\n";[br]}[/br]closedir DIR;[/br] Share this post Link to post Share on other sites