Hi,
I have this short javascript code:
date = '1.2.2002';
cc = (date.length) - 4;
year = (date.substr(cc,4));
It removes the text before the year and returns only the year. The string may be for example '12.12.2002' or 'January 2003' or only '2003'.
And I need it in perl. I have already this:
$julkpvm = $rec{'date'};
$cc = (length($julkpvm) - 4);
But the last part is missing, and I don't know how to do it...?
maco
I have this short javascript code:
date = '1.2.2002';
cc = (date.length) - 4;
year = (date.substr(cc,4));
It removes the text before the year and returns only the year. The string may be for example '12.12.2002' or 'January 2003' or only '2003'.
And I need it in perl. I have already this:
$julkpvm = $rec{'date'};
$cc = (length($julkpvm) - 4);
But the last part is missing, and I don't know how to do it...?
maco