```{index} single: add_history; Term::ReadLine::Gnu function ``` ```{index} single: Term::ReadLine::Gnu::add_history; Perl function ``` # add_history Append `$line` to the end of the history list so it shows up in later Up-arrow recalls and searches. ## Synopsis ```perl $term->add_history($line) if $line =~ /\S/; ``` Readline does not deduplicate for you. Wrap the call in an `if` if you want to skip blank or repeated lines. Use `write_history` to persist the collected lines to disk.