s/\s.*// foreach ($server,$user,$passwd,$dbconn,$dbuser,$dbpasswd); $shpath =~ s/\s+.*// if $shpath;