which nzbget
let's say it tells you it's in /usr/local/bin/nzbget you would modify your code to be:
my @args = ("/usr/local/bin/nzbget", $item);
system(@args) == 0
or die "Could not run '@args' ($?): $!\n";
The $! is *very* useful to help you here because it will tell you the system error that is being thrown to tell you why the command is failing.
The ($?) will show you the return code that the program failed with (in case there was nothing useful in $!).
Watch out for the fact that system is a little different from other functions that you expect to return 1 on success such as open:
my $args = "/usr/local/bin/nzbget $item"
open("$args |") || die "Can't run '$args': $!\n";
If you read system you will see that this is based around the fact that a program exiting successfully normally returns 0 (and system() does special magic on the return code to give you more useful info wrapped up in one number)
|