in reply to 'require Carp;' has differnet meanings under 'use warnings;'?

Just to add fuel to the fire: your first example will work fine if you use parentheses, like so:

require Carp; Carp::croak("This works fine also");
If Perl has compiled a sub, you can drop the parentheses when calling it. Otherwise you need to leave them in. But let's not get into prototypes....