while ($Line = <>) { chomp($Line); $Line =~ s/^[ \t]+//; ### Check for spaces and tabs and remove $Line =~ s/[ \t]+$//; ### Check for trailing spaces and tabs and remove $Line =~ s/[ \t]+/ /g; ### Global Substitution to remove extra spaces and ### tabs between words @ARGV = split(/ \\\\/, $Line); $DisplayName = shift @ARGV || die; $Machine = Win32::NodeName() unless( $Machine = shift @ARGV ); $Machine = "\\\\$Machine"; $Machine =~ s/^\\{2,}/\\\\/; if( Win32::Service::GetServices( $Machine, \%List ) )