my $x = `time /t`; # Assign $x to the system time (only in Windows) chomp $x; # $x now holds something like "10:51 AM"