home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!pmafire!news.dell.com!swrinde!mips!mips!decwrl!deccrl!news.crl.dec.com!rdg.dec.com!ds3100.new.dec.com!stuart
- From: stuart@ds3100.new.dec.com (Stuart Broderick)
- Newsgroups: comp.lang.perl
- Subject: stat.pl query
- Keywords: PERL
- Message-ID: <1992Jul28.171317.22804@rdg.dec.com>
- Date: 28 Jul 92 17:13:17 GMT
- Sender: news@rdg.dec.com (Mr News)
- Reply-To: stuart@ds3100.new.dec.com (Stuart Broderick)
- Organization: Digital Equipment Corporation
- Lines: 28
-
- Probably a stupid question, but....
-
- The following script is using stat.pl to determine the mode of a file
- using stat.pl.
-
- #! /usr/local/bin/perl
- require 'stat.pl';
- do Stat('./test');
- print $st_mode,"\t",$st_uid,"\t",$st_gid,"\n";
-
- When this runs, I get
-
- st_mode st_uid st_gid
- 33224 1103 100
-
- When I do a "ls -lag ./test", I get
-
- -rwx--x--- 1 stuart espo 286720 Jul 28 17:56 ./test
-
- The username and group are correct (st_uid, st_gid), but what does
- st_mode relate to ?
- I expected it to give 0710.
-
- Can anyone tell me what I've done wrong ? I'm looking for a numeric
- representation of
- the permissions field.
-
- Stuart.
-