in reply to Date String Conversion

Here is a solution of just applying a regex to your String: I assume that you want the "20" as the day? Or what is $yday?
my $date = 'Wednesday, May 20, 2009 2:09 PM'; my ($yday) = $date =~ /(\d+)/;
The "20" are the first digits in this string, so I just captured the first 1+ digits in the regex.