Are you using the warnings and strict pragmas?
If not then add them and declare all of your vars, which is done via the 'my' keyword.
As shown above, you probably should use the list form of system.
my @cmd = ('svm_classify', '<testfile>', '<modelfile>', '<outputfile>');
system(@cmd) == 0
or die "system @cmd failed: $?";
Since this is a cgi script, while developing/debugging, you should also have:
When a script works from the command line, but not when run as a cgi script, then in most cases that's due to the difference in the user environment. When run from the command line, it's running under your shell and privileges, but when run as a cgi script it's running under the web server user account and privileges.
use CGI::Carp qw(fatalToBrowser);