my $x = { 'Moby Dick' => "The entire text of Moby Dick...", 'The Lord of the Rings' => "The entire text of Lord of the Rings...", 'Great Expectations' => "The entire text of Great Expectations...", 'War and Peace' => "The entire text of War and Peace...", }; #### my $books = lock_retrieve('books.data'); #### my $search_string = 'ect'; foreach $title (keys %$books) { print $books->{$title} if $title =~ /$search_string/i; }