$term->setlflag(ICANON); # set back to canonical mode $term->setattr(0,TCSANOW); # apply it to STDIN undef($term); # cleaning up