I don't think that's the "separator" the OP's code is looking for.
$Config{path_sep} returns the symbol that separates the pathnames in $ENV{PATH}, but I believe the OP's code is looking for the symbol that separates the individual directories within a pathname.