Jason Corbett wrote:
i want to use the sub routine to time stamp processes and such
whenever i need to. So, I wrote this below to call the routine into
a variable $process_date. Is there a better way to read the date
into a variable and use it?
Yes. Use Perl's built in function for the purpose:
jason corbett wrote:
i want to use the sub routine to time stamp processes and such whenever
i need to. So, I wrote this below to call the routine into a variable
$process_date. Is there a better way to read the date into a variable
and use it?
For one you should scope it if its a function.
IE
Jason Corbett wrote:
>
> i want to use the sub routine to time stamp processes and such whenever
> i need to. So, I wrote this below to call the routine into a variable
> $process_date. Is there a better way to read the date into a variable
> and use it?
Yes, use localtime() or POSIX::strftime().
i want to use the sub routine to time stamp processes and such whenever
i need to. So, I wrote this below to call the routine into a variable
$process_date. Is there a better way to read the date into a variable
and use it?
Thanks,
JC
sub dateme{
$process_date=system('return date');
}return