Perl : copying only the latest file to other directory

In linux.. In a directory there are 3 files which I want to copy only the latest file (ls -ltr myfiles*.txt|tail -1) to other directory in perl?

Could anyone please help me with the code?

Regards,
J

What do you think of this-link ?? :slight_smile: