|
|
|
|
![]() ![]() |
Oct 20 2004, 04:42 PM
Post
#1
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 29 Joined: 19-October 04 From: Russia Member No.: 1,827 |
My 3th Perl Programm
The current dir show... CODE #!/usr/local/bin/perl # dir path $sdir='.'; opendir(DIR,$sdir) || die "can't opendir $some_dir: $!"; @dots = grep {-d "$sdir/$_"} readdir(DIR); rewinddir(DIR); @fils = grep {-f "$sdir/$_"} readdir(DIR); foreach (@dots){ print "$_\n"; } foreach (@fils){ print "$_\n"; } closedir DIR; |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 24th July 2008 - 12:10 PM |