chomp(my $date = qx(date +%x_%T)); #### use POSIX 'strftime'; my $date = strftime "%x_%T", localtime;