As for Windows, using Win32::LongPath avoids headaches.
In reply to Re^3: how are ARGV and filename strings represented? by ikegami in thread how are ARGV and filename strings represented? by almr