in reply to Testing for group or world writable files

Here's one non-scientific way to check:

#!/usr/bin/perl use warnings; use strict; use Test::More; my $file = 'file.txt'; my $perms = sprintf("%o", (stat $file)[2] & 0777); my ($u, $g, $w) = split //, $perms; my @writable = qw(2 3 6 7); ok (!(grep /$g/, @writable), "File is not group writable"); ok (!(grep /$w/, @writable), "File is not world writable");

-stevieb