in reply to Re: quoting/escaping file names
in thread quoting/escaping file names

It sounds like "$vaa it's not.txt" was only one example of a problematic filename, and so I gotta say I don't think your solution is general enough.

Instead, I can only recommend to avoid the shell entirely (and only using the shell when you really know you really want its features - it really is another layer between Perl and the program you want to call, and you have to know how to use the shell, which isn't a given). This is possible via system (if you read its and the exec docs entirely because the invocation is a little tricky; and the output can be captured by something like Capture::Tiny), IPC::System::Simple, IPC::Run3, and a few others.