in reply to error handling

Try putting your code into <code> blocks... like this:

use Error qw(:try); try { `$create_script $input`; #code that might thrown an exception; return; } catch Error with { my $error_handler = shift; # Get hold of the exception object } exit;


As it is, I don't see any "syntax" errors with that. However:

1) There is no need to "return" from the try block
2) No output will be captured.

If you want the actual output from the script captured, do this:
my $output = `$create_script $input`

If you want the return code, you need to check out the system call.