theneil has asked for the wisdom of the Perl Monks concerning the following question:
Trying to print the time from a substring (time is in Hex):
Why does this work?
print MYFILE scalar(localtime(0x506143ca)); # #Prints: Tue Sep 25 00:40:26 2012 #
But not this:
Any help is greatly appreciated! Thanks!my $daTime = "0x506143ca"; print MYFILE scalar(localtime($daTime)); # #Prints: The default date - something like Jan1 1969 #
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Hex, Localtime and strings
by Fletch (Bishop) on Sep 26, 2012 at 17:18 UTC | |
Re: Hex, Localtime and strings
by davido (Cardinal) on Sep 26, 2012 at 17:18 UTC | |
by theneil (Novice) on Sep 26, 2012 at 17:25 UTC | |
by simatics (Initiate) on Jun 22, 2013 at 14:25 UTC | |
Re: Hex, Localtime and strings
by toolic (Bishop) on Sep 26, 2012 at 17:31 UTC | |
Re: Hex, Localtime and strings
by sundialsvc4 (Abbot) on Sep 26, 2012 at 18:09 UTC |
Back to
Seekers of Perl Wisdom