On Fri, 1 Feb 2002, John W.Krahn wrote: >On Friday 01 February 2002 02:26, Bart Lateur wrote: >> >> On Thu, 31 Jan 2002 22:10:03 -0500, Michael G Schwern wrote: >> > >> >$date =~ s{(.*)}{sprintf '%02d/%02d/%d', split '/', $1}e; >> >> $date =~ s{(\d+)/(\d+)/(\d+)}{sprintf '%02d/%02d/%d', $1, $2, $3}e; > > $date = sprintf '%02d/%02d/%d', $date =~ m|(\d+)/(\d+)/(\d+)|;
$_ = '9/9/1976'; # for readability's sake $_ = sprintf '%02d/' x tr|/|| . '%d' => m/(\d+)/g; Cheers, Bernard