in reply to Re: Create unique scratchdir name
in thread Create unique scratchdir name
you're assuming that's an issue. It might not be - depends on context. Eg, a daily scan of a log file? useful and not a problem.
hsinclai, you can call localtime in array context. Doing so, an optimisation of the above might be:
sub makename { my @time = localtime(); return sprintf("%04d-%02d-%02d_%02d:%02d:%02d", $time[5]+1900, $time +[4]+1, @time[3,2,1,0]); }
Update: thanks I0 - oops.
--
seek(JOB,$$LA,0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Create unique scratchdir name
by hagus (Monk) on May 13, 2002 at 11:09 UTC | |
by cLive ;-) (Prior) on May 13, 2002 at 20:18 UTC | |
by hsinclai (Deacon) on May 15, 2002 at 02:25 UTC | |
|
Re: Re: Create unique scratchdir name
by I0 (Priest) on May 13, 2002 at 22:39 UTC | |
|
Re: Re: Create unique scratchdir name
by hsinclai (Deacon) on May 14, 2002 at 01:00 UTC |