The only way I know of is to check $Config{cc} (Corion told me that one ages ago) then see if you can load it with system or qx (redirecting stderr). That ensures you are using the same compiler as perl, which can be an issue sometimes, particularly on Windows.