Can a Perl script detect whether it's running under Activestate vs Strawberry Perl?
问题 I have a Perl script I'm still trying to debug and in the process I've noticed that it behaves differently running under ActivePerl and Strawberry Perl. This has led me to wonder how a Perl script might detect under which of these flavours it is running. 回答1: ActivePerl on Windows always (or at least since Perl 5.005) defines the Win32::BuildNumber() function, so you can check for it at runtime: if (defined &Win32::BuildNumber) { say "This is ActivePerl"; } else { say "This is NOT ActivePerl"