You are missing the following line in your code:
use Encode::CN;
As you can see in Encode::Byte documentation, cp936 it is not included. But it is listed in Encode::CN docs.
Adding both packages (Encode::Byte and Encode::CN should solve your problem).