Re: Time stamping a process in a log file

2004-06-28 Thread Gunnar Hjalmarsson
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:

Re: Time stamping a process in a log file

2004-06-28 Thread JupiterHost.Net
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

Re: Time stamping a process in a log file

2004-06-28 Thread John W. Krahn
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().

Time stamping a process in a log file

2004-06-28 Thread jason corbett
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