in reply to checking file permissions
die "$file does not exist!\n" unless -e $file; my @perms; push @perms, 'read' if -r $file; push @perms, 'write' if -w $file; push @perms, 'execute' if -x $file; print @perms ? "You have @perms perms\n" : "You got zip\n";
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: checking file permissions
by freddo411 (Chaplain) on Nov 14, 2004 at 01:10 UTC | |
by tachyon (Chancellor) on Nov 14, 2004 at 08:36 UTC | |
|
Re^2: checking file permissions
by Your Mother (Archbishop) on Nov 14, 2004 at 18:16 UTC |