You could try adding the following to the top of your program
use utf8;
But it would be better to just make sure your program does not contain any non-ASCII characters outside of literal strings.
And most importantly, WHEN YOU ASK A QUESTION ABOUT YOUR PROGRAM, SHOW US THE PROGRAM SO WE KNOW WHAT YOU'RE TALKING ABOUT AND WE CAN TELL YOU EXACTLY HOW TO FIX IT.