I’m assuming you are on Windows if you are executing a log file and getting the result you expected. (having it open in notepad or whatever)
The more official way to do this is with the ShellExecute Win32 API function. Looks like the Win32::FileOp module can do this. I believe the perl script will continue running without waiting for Notepad to exit, so you can end the perl script more gracefully than with exec.
This was previously answered in Launching a data file in Win32 using the assciated application automatically