#!/usr/bin/perl -w use Time::Piece; use strict; my $date = '3/11/16, 00, Mar, 2016'; Time::Piece->strptime($date, '%D, %M, %b, %Y') =~ /^(.+)\d\d:\d\d:\d\d (.+)$/ ; my $date1 =join ' ',$1,$2; print "$date1\n";