in reply to Re: checking file permissions
in thread checking file permissions

Also a good place to introduce _ even if it's not saving much here (discussed in JediWizard's perldoc.com link; _ is a hard thing to search for).

die "$file does not exist!\n" unless -e $file; my @perms; push @perms, 'read' if -r _; push @perms, 'write' if -w _; push @perms, 'execute' if -x _; if ( @perms ) { printf "You have %s perms\n", join(", ", @perms); } else { print "You got zip\n"; }