determine if a string of perl code is complete