sub get_date { my($sec,$min,$hour,$day,$month,$year) = (localtime($_[0]))[0..5]; my $datum = sprintf "%02d.%02d.%04d - %02d:%02d:%02d",$day,$month+1,$year+1900,$hour,$min,$sec; return $datum; } sub new_pass { my @password = ("a".."z","A".."Z",0..9); my $password = join '', map { $password[int rand @password] } 0..7; return $password; }