eg, in C++: SV* result = eval_pv( code.c_str(), TRUE); if( SvTRUE(ERRSV) ) { // Print out errors }