dallok has asked for the wisdom of the Perl Monks concerning the following question:
Any thoughts. I know that the print TESTED "$NAME\n" is incorrect but not sure how to get the return from the ping request?#! c:\perl\bin -w my $NAMES = "c:/names.txt"; open NAMES, $NAMES or die "DOH cannot open $NAMES"; @NAMELIST=<NAMES>; chomp(@NAMELIST); foreach $NAME (@NAMELIST) { open TESTED, '>>C:\tested.txt'; system('c:\winnt\system32\ping.exe -n 1 -w 75 "$NAME"'); print TESTED "$NAME\n"; close TESTED; } close NAMES; exit 0;
Originally posted as a Categorized Question.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: how do I test against each element in an array
by chromatic (Archbishop) on Nov 07, 2000 at 22:44 UTC | |
|
Re: how do I test against each element in an array
by little (Curate) on Nov 07, 2000 at 22:46 UTC | |
|
Re: how do I test against each element in an array
by kilinrax (Deacon) on Nov 07, 2000 at 22:45 UTC | |
|
Re: how do I test against each element in an array
by davorg (Chancellor) on Nov 07, 2000 at 22:45 UTC | |
|
Re: how do I test against each element in an array
by the_slycer (Chaplain) on Nov 07, 2000 at 22:51 UTC |