replaced system which with File::Which. Used Sys::Hostname again.