小骆驼图书第十二章练习;
1.
foreach my $file (@ARGV){
my $attribs = &attributes($file);
print " '$file' $attribs .\n";
}
sub attributes {
my $file = shift @_;
reture "does not exist " unless -e $file; #如果不存在则直接返回
my @attrib;
push @attrib , "readable" if -r $file;
push @attrib , "writeable" if -w $file;
push @attrib, "executable" if -x $file;
return "exists" unless @attrib;
}