You would need to add a new function exposed to perl. It's not hard to do, and there are many examples available. Once you have that you need to execute the same code the command does.
If you're lucky the command just calls another function to do the work and your perl function can do the same.
If you're unlucky the command has the code inside it. In that case you would need to move that code to another function that both can call.
|