#!/usr/bin/env perl use strict; use warnings; use Time::Piece; my $source = 'Mon Oct 29 15:59:06 2018'; my $time = Time::Piece->strptime ($source, '%a %b %d %T %Y'); # Now use it however you wish print $time->datetime . "\n"; print "Today is " . $time->fullday . "\n";