my %SEPARATOR_BY_OS = ( darwin => ':', MSWin32 => '\\' ); sub get_pathname_separator { $SEPARATOR_BY_OS{$^O} // '/' }