AlbertG
Industrial
- Aug 9, 2005
- 42
Greetings!
Well, I dug myself in over my head with a basic syntax debacle in Perl for my Linux box.
Here's the code sample which I wish to fix:
Simply, this code is to lurk in the background until "some-process" is running on the system, pop a warning box at that point, stand by after the user clicks "OK", and then lurk again until the next round.
All "goto" style matters aside, where might I have missed the mark syntaxwise in this rustic example? Of course, any help is thoroughly appreciated...
Thanks so much!
Well, I dug myself in over my head with a basic syntax debacle in Perl for my Linux box.
Here's the code sample which I wish to fix:
Perl:
#!/usr/bin/perl
$value = '$(pgrep some-process | wc) -gt 0';
TEST:
if ($value)
{
sleep 2;
zenity --warning --text="some-process is running.";
goto STANDBY;
}
else
{
goto TEST;
}
STANDBY:
if ($value)
{
goto STANDBY;
}
else
{
goto TEST;
}
Simply, this code is to lurk in the background until "some-process" is running on the system, pop a warning box at that point, stand by after the user clicks "OK", and then lurk again until the next round.
All "goto" style matters aside, where might I have missed the mark syntaxwise in this rustic example? Of course, any help is thoroughly appreciated...
Thanks so much!