http://www.perlmonks.org?node_id=322889


in reply to split efficiency needed

I do not know you exact environment, but apparently you are processing ls output on a Unix/Linux system. If so, would it be possible to avoid using ls in the first place... The reason for this, is that the date format in the ls output depends on the locale settings and may therefore change. In my settings, it is 2004-01-21!

Maybe you can rewrite the code to this:

my $mtime = (stat $file)[9]; use POSIX 'strftime'; print strftime "any format you like", localtime $mtime;