state $term = Term::ReadLine->new('note'); my $prompt = "LINE:"; chomp($note = $term->readline($prompt)); $note = decode 'UTF-8', $note; $term->addhistory($note) if $note =~ /\S/;