The error you report is not what should happen if that statement is executed normally, so I'd wonder about the preceding lines containing the error. "use Carp;" works fine for me, and if I change it to an unrecognized package ("use Caaaarp;") it complains "can't locate Caaaarp.pm".
I think...