fwd: shell out to perl, return based on response

refs #13755
cleanup: Added some comments and cleaned up some code