my $str="hello world\n"; my $lchar=unpack('A1',$str); print "$lchar \n";