> > my $date = localtime;
>
> >And use $date->day (or month or year) later when you need to.
>
> But people *like* to be able to put things in simple variables.
> It's more convenient to type $day than $date->day for repeated usage.
Precisely. Hence my previous suggestion:
$day = localtime; # return date string in SCALAR context
$year = localtime->{year}; # return hash ref in HASHREF context
(@bits) = localtime; # return list in LIST context
This just relies on extensions to the context mechanism which I will RFC RSN
when I propose the new want() built-in to replace wantarray().
Damian