[ale] using Time::localtime in perl

Jerry Z. Yu z.yu at ptek.com
Mon Feb 4 12:42:39 EST 2002


	localtime will return an array, unless you cast it to a string by
'scalar' operator or implicitly uses it in a scalar environment.
	'man perlfunc' will tell you all.

On Mon, 4 Feb 2002, David S. Jackson wrote:

#I'm getting an mtime and an atime value from a stat command.  I
#believe this comes back in Epoch format, right?
#
#So when I go
#
#	my $info = stat("pathto/file");
#	my $access = $info->atime;
#	my $created = $info->mtime;
#
#	my $realaccess = localtime($access);
#	my $realcreate = localtime($created);
#
#why do $realaccess and $realcreate get values like
#
# 	Time::tm=ARRAY(0x81b1a78)?
#
#TIA!
#
#--
#David S. Jackson                        dsj at dsj.net
#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#"But I don't like Spam!!!!"
#
#---
#This message has been sent through the ALE general discussion list.
#See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
#sent to listmaster at ale dot org.
#

Jerry Z. Yu					+1-404-262-8544 (O)
Systems Engineer				z.yu at ptek.com
IS Support, Voicecom,				www.voicecom.com
A business unit of PTEK Holdings, Inc.		www.ptek.com


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list