use utf8; my $U; while ($column =~ /\G(.)/g) { # WRONG! Thanks John M. Dlugosz $U = unpack('C', $1); $U = unpack('U', $1); # Now that's the ticket $U < 127 and $U > 31 or return; } return 1;