I can think of lots of times the output of 'time()' has been just what I
needed. For example, anytime you want to compare times, like
my $timeout = time() + $sec_to_alarm;
do {
#stuff
} until (time() > $timeout);
Or to compare dates
$date = timelocal(@user_supplied_date);
$now = time();
if ($
> I have a question. Why is it that I have to use 'scalar
> localtime' to view a datetime in the proper format.
> Why would I want to use the weird UNIX format that I
> can't read?
You don't, but Perl isn't stupid enough to impliement
several dozen ways of displaying the date... not in the
langua
"Michael Pratt" <[EMAIL PROTECTED]> writes:
> I have a question. Why is it that I have to use Scalar localtime to view a
> datetime in the proper format. why would I want to use the weird UNIX format
> that I cant read?
If you want to manipulate the parts separately:
my @slice = (I don't re
On Dec 15, Michael Pratt said:
>I have a question. Why is it that I have to use Scalar localtime to view a
>datetime in the proper format. why would I want to use the weird UNIX format
>that I cant read?
time() returns the number of seconds since 1970 -- I certainly can't
divine the current date
I do like UNIX. I was just wondering what type of program would you write to
use that type of UNIX format?
Mike
"Jonathan e. paton" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I have a question. Why is it that I have to use 'scalar
> > localtime' to vie