srlowry has asked for the wisdom of the Perl Monks concerning the following question:
The output also appends the node names with '$'. How can I remove the '$' from the name in the output file? Thanksuse strict; use Win32::AdminMisc; use Win32::NetAdmin; my $PDC; my @List; my $file = "C:\\temp\\NODE.txt"; my $Domain = Win32::DomainName(); unless (open (FILE,">$file")) { die $!; } Win32::NetAdmin::GetDomainController("",$Domain,$PDC); if (Win32::AdminMisc::GetMachines($PDC,UF_WORKSTATION_TRUST_ACCOUN +T,\@List,)) { map {print "$_\n"} @List; map {print FILE "$_"."\n"} @List; } close (FILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Remove '$' from system names
by diotalevi (Canon) on Mar 19, 2007 at 00:20 UTC | |
|
Re: Remove '$' from system names
by blogical (Pilgrim) on Mar 18, 2007 at 23:59 UTC | |
|
Re: Remove '$' from system names
by andye (Curate) on Mar 19, 2007 at 10:41 UTC |