sub hg_split{ my @slice = split($_[1],$_[2]); return $slice[$_[0]]; } #### print hg_split(0,'\.','www.google.com');