from perldoc -f stat: use File::stat; $sb = stat($filename); printf "File is %s, size is %s, perm %04o, mtime %s\n", $filename, $sb->size, $sb->mode & 07777, scalar localtime $sb->mtime;
$sb->mode is what you wanted? On Thu, Apr 22, 2010 at 12:33 PM, newbie01 perl <newbie01.p...@gmail.com> wrote: > Hi, > > Does anyone have a UNIX permission bit calculator script that I can use? > Basically, am looking for one where I don't have to a ls -l to check the > permission on a file or directory. Am looking for a script that will display > the permission bits and then just display what those permission bit settings > are and its correspong number equivalent. > > I've found some on the web via Google but none of them is a script > Any suggested link will be very much appreciated. Thanks in advance. > -- Jeff Pang http://home.arcor.de/pangj/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/