# return time as string in format: hhmmss sub time2str { my ( $sec, $min, $hour ) = localtime; return "%02d%02d%02d", $hour, $min, $sec; }