N
news.hinet.net
Direcory:
/usr/local/ap/
Filename:
1
1.lock
2
3
4
4.lock
want to list 2 and 3.
========================================================
opendir(DIR,"/usr/local/ap/");
@dots = grep {-f "/usr/local/ap/$_" && $_ !~m/\.lock/} readdir(DIR);
close(DIR);
========================================================
The @dots have 1 2 3 4 elements. I know i can use -e to check the
$filename.lock in loop.
But how to make @dots just have 2 and 3? Becaues the directory have
many files,i don't want to worse time to check the $filename.lock .
please help!
thanks!
/usr/local/ap/
Filename:
1
1.lock
2
3
4
4.lock
want to list 2 and 3.
========================================================
opendir(DIR,"/usr/local/ap/");
@dots = grep {-f "/usr/local/ap/$_" && $_ !~m/\.lock/} readdir(DIR);
close(DIR);
========================================================
The @dots have 1 2 3 4 elements. I know i can use -e to check the
$filename.lock in loop.
But how to make @dots just have 2 and 3? Becaues the directory have
many files,i don't want to worse time to check the $filename.lock .
please help!
thanks!