#22002/7/5 17:14:05
#! /usr/bin/perl
$path="/home/liming/" ;
opendir(DIR,$path) || die "can't opendir: $!";
if(-d $path)
{
@file = readdir(DIR) ;
foreach(@file)
{
print($_ . "\n") ;
}
}
else
{
print("the dir not exist !") ;
}
closedir(DIR) ;
---------------------------------------
符合要求么? :)
编辑历史:[这消息被deathcult编辑过(编辑时间2002-07-05 17:14:35)]
[这消息被deathcult编辑过(编辑时间2002-07-05 17:15:14)]