#!/usr/bin/perl -w use strict; my $date= 'Sun Apr 1 10:27:03 CDT 2001'; if ($date =~ m/^(\w{3}\s+\w{3}\s+\d+)/) { print "Matched $1\n"; }