G
grocery_stocker
The following scrpt is supposed to continuously scan the *nix who list
to see if a particular person enters the party chatline. If they
enter, then the script is supposed to trigger the nope program. When
than person leaves, the nope program is supposed to be killed and the
script goes back to scanning to see if that person enters the party
chanline again.
However, I can't seem to get it to work correclty. Ideas?
#!/usr/bin/perl
my $pid;
while (True)
{
if(`w | grep cdalten | grep party`) {
$pid = open(FH, "/home/guest/cdalten/nope2 &|");
#print $pid;
kill $pid;
}
kill $pid;
sleep(1);
}
to see if a particular person enters the party chatline. If they
enter, then the script is supposed to trigger the nope program. When
than person leaves, the nope program is supposed to be killed and the
script goes back to scanning to see if that person enters the party
chanline again.
However, I can't seem to get it to work correclty. Ideas?
#!/usr/bin/perl
my $pid;
while (True)
{
if(`w | grep cdalten | grep party`) {
$pid = open(FH, "/home/guest/cdalten/nope2 &|");
#print $pid;
kill $pid;
}
kill $pid;
sleep(1);
}