Is there a faster and/or cleaner way to do the following:

#
# End date is a year after start date
#
$edate = $sdate;
$edate =~ s/\///g;
$edate++;
$edate =~ s/.*(\d{4})$/01\/04\/$1/;     

where $sdate is a UK date of the type "dd/mm/yyyy"

I've tried ($edate = $sdate) =~ s/(.*)(\d)$/$1($2++)/e; to no avail. I think
I'm misunderstanding the /e modifier here?

Cheers,

Lee

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to