in reply to cross platform perl - how to modify $path
The idea is to use the difference between what File::Spec->path returns and the actual value of the $PATH variable. This correctly gives me ";" on win2k and ":" on my linux bash shell.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; }
|
|---|