#!/usr/bin/perl -w use strict; use warnings; my $time = time; my $timestr = localtime($time); print "Current date/time is $timestr\n"; #### my $x = `time /t`; # Assign $x to the system time (only in Windows) chomp $x; # $x now holds something like "10:51 AM"