#!/usr/bin/perl use strict; # <--- Because of this... use warnings; use diagnostics; my $char = chr 0x394; #^-----------------------You must do this. (my) my $code = ord $char; #^----------------------- And this. (my)