The biggest problem I see right away is:
if ("`netstat -i | grep -i P01`" eq "P01"). You don't want double-quotes AROUND the backticks, and your string is going to have a newline at the end of it. It should be
`netstat -i | grep P01` eq "P01\n". I've taken the
-i out of the call to
grep, since if it matched "p01" instead of "P01", you still wouldn't get a valid match (because "p01" ne "P01").
_____________________________________________________
Jeff[japhy]Pinyan:
Perl,
regex,
and perl
hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;