http://qs321.pair.com?node_id=203534


in reply to Obtaining The Exact Time

If you want a unique filename, combine the timestamp with the process ID of the fork handling the connection...

Your question asks how to get the exact time, but I would be more worried about a guaranteed unique value.

Russ
Brainbench 'Most Valuable Professional' for Perl

P.S. Look at POSIX::strftime. I think

my $Now = strftime('%Y%m%d', localtime)
is much prettier to use than
($sec, $min, ...) = (localtime())[0..5]; $Now = sprintf('%4d%2d%2d', $sec, $min...);