#! C:\perl\bin open me, '>f:\scripts\text\nodedown.txt'; print me "$ARGV[1] $ARGV[2] is Down on $ARGV[0].\n"; close me; $ROUTE = "F:/scripts/text/routers.txt"; open ROUTE, $ROUTE or die "Cannot open $ROUTE: \n"; @lines=<ROUTE>; $test= $ARGV[0]; if (grep {$_ eq $test} @lines) { system('f:\scripts\cmds\nodedown.cmd'); } close ROUTE; exit 0;
Originally posted as a Categorized Question.
In reply to Need to compare what is in $ARGV0 to an array by dallok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |