The correct order of operations for working with encoded data (whether utf8 or any other encoding) is:
- Input
- Decode
- Operate
- Encode
- Output
If you don't decode your input you'll be comparing apples and elephants which is why your regex fails to match. However, if you do no operations on the data at all, then you can skip the middle three steps because your perl script in that case is just essentially a pipe between your input (eg. database) and your output (eg. web page).
This is all explained in much better detail in A UTF8 round trip with MySQL. HTH.