BrowserUK has given you a good solution. To add on use system instead of back ticks ``. Get the system commands out put and determine whether it was success or not.
eg:$result=system("regsvr32 -U $_");
Now determine the $result value and find out the result.