in reply to system command

If you just want whatever association Windows might have for an extension to determine the program, and Windows "Command Extensions" are enabled, then
system "start $filename";
will do.