in reply to stat and permissions
I just want to store those 4 numbers in a scalar.Use sprintf:
$mode = sprintf '%04o', (stat $file)[2] & 07777; print "Permissions are $mode\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: stat and permissions
by Stoomy (Novice) on Jan 17, 2011 at 19:47 UTC |