Code:
chdir $working_directory; system($htmlthumbnail_script,'-update',$index_file,
'-output',$index_file,
'-link',1,
$new_graphic_file);
The call is right there. This code snippet actually works (the one I posted). You just have to set up the variables, and call it.
system() is a call to execute an external process. It's _VERY_ dangerous with user input, hence all the routines to scrub input of funny characters, but if you are calling it from inside your cgi script with your own parameters -- it's pretty safe.
This is where the perl "taint" checking comes in. If a variable is tainted in anyway your program will produce an error for you.