[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Creation/Modification Date



>Is there a way to get (and set, for that matter) a file's creation and
>modification dates in MacPerl? I didn't see anything in the pods for the
>File-related toolbox modules. (And -M doesn't quite cut it, since its
>value will change during the run of a script.)

If you have installed MPW (and ToolServer), try

	print `files -l \"$file\"`;

Currentry MPW is free.

By the way, why don't you use -M and $^T?  It is much general in
MacPerl, I think; because not all has ToolServer.

	$t=localtime($^T - (-M $file) * 86400);
	print "$t\n";

-------------------------------------------------
Mamoru Yamanishi <yama@biotech.okayama-u.ac.jp>
+81-86-251-8196(voice), +81-86-251-8264(GIII fax)
Biotech. Dept., Okayama Univ.



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch