|
发表于 2004-6-1 22:35:19
|
显示全部楼层
re
[php]
#!/usr/bin/perl -w
use strict;
foreach my $file(@ARGV)
{
print("Checking $file:");
if(-e $file)
{
print("$file exists!\n");
}
else
{
if(-f $file)
{
print("The file $file is:");
print("执行")if(-x $file);
print("只读")if(-r $file);
print("可写")if(-w $file);
print("\n");
}
elsif(-d $file)
{
print("$file is a directory!\n");
}
}
}
[/php]
试试这吧 |
|