home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!darwin.sura.net!wupost!sdd.hp.com!hplabs!ucbvax!van-bc!sqwest!mch
- From: mch@sqwest.wimsey.bc.ca (Mark C. Henderson)
- Newsgroups: comp.lang.perl
- Subject: Re: stat.pl query
- Keywords: PERL
- Message-ID: <1992Jul28.222152.19409@sqwest.wimsey.bc.ca>
- Date: 28 Jul 92 22:21:52 GMT
- References: <1992Jul28.171317.22804@rdg.dec.com>
- Organization: SoftQuad Inc., Surrey, B.C. CANADA
- Lines: 31
-
- In article <1992Jul28.171317.22804@rdg.dec.com> stuart@ds3100.new.dec.com (Stuart Broderick) writes:
- >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
- >
- >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.
-
- 33224 (decimal) = 100710 (octal)
-
- Mark
- --
- Mark Henderson, SoftQuad Inc, 108-10070 King George Hwy, Surrey, B.C. V3T 2W4
- Internet: mch@west.sq.com, mch@sqwest.wimsey.bc.ca
- UUCP: {van-bc,sq}!sqwest!mch Telephone: +1 604 585 8394 Fax: +1 604 585 1926
-