[EMAIL PROTECTED] wrote: > > I've learned alot from all this. Thanks for the info! > This is what I pulled from the learning perl book. > ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$b > > locks) = stat(...) > > I tried this to access the mode but it puts out a number 16877 that I don't > konw how to decipher.
If you are on a unix-like system the STAT(2) man page describes in some detail what the different bits in $mode mean. Perl's POSIX module contains the constants and macros described in STAT(2). For a complete description of files and file I/O in Unix get _Advanced Programming in the UNIX Environment_ by W. Richard Stevens, ISBN: 0-201-56317-7. > my($mode) = (stat("$base/$dir_path"))[2]; > > and is this code platform independant? If the platform is POSIX compliant it should be. YMMV John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]