use Env; sub GetPathVarSeparator{ my( $len, $separator ); #get the length of the first item in the path $len = length( (File::Spec->path)[0] ); $separator = substr( $PATH, $len, 1 ); return $separator; }