Provider cannot be found. It may not be properly installed.
Have you tried the VBA code from Excel and/or Microsoft Access or any other "known good" application? Have you looked at what odbcad32.exe (or the 64-bit variant) and/or whatever method ADO has for listing providers list? Maybe the name is different, or maybe the user account you have does not have the correct permissions to use the provider? What does the manual for SQL Server CE say about connecting to it via ADO? Are you using a 64-bit Perl or a 32-bit Perl?
Try to eliminate as many variables from the problem. If ADO works, then try to elminate the bitness - check whether connecting via ADO 32-bit works, or whether it is limited to 64-bit ADO, by using 32-bit resp. 64-bit applications. Check that the .sdf file exists and is accessible for the user running your program.