in reply to Re^4: Not able to ParseDate lines from a file
in thread Not able to ParseDate lines from a file

Your code seems to expect eight digits:
my $year = substr $array[13], 22, 8;
I don't know which year in the future you post from. It's great that at least eight thousand years into the future, People are still using Perl 5. If you're communicating with people below the 10K limit, they expect years to be four digits. Maybe you should show your input data. Most likely, if you are in fact dealing with four-digit years, you extract leading spaces. Perl will treat a string with leading spaces as 0 in numerical context.