in reply to Problems with special characters in Linux file names

Have you considered using the built-in Perl fn readdir() & friends https://perldoc.perl.org/functions/readdir & Chap 9 of Perl cookbook?

This would avoid you having to try and parse in the shell.
  • Comment on Re: Problems with special characters in Linux file names