#! /usr/local/bin/perl5 $ctr = 1; print (" I will ask you about five books: \n"); while($ctr <= 5) { $ctr = ++$ctr; print("Enter year of publication "); chop($year = <STDIN>); print("Enter title: "); chop($title = <STDIN>); $title =~ tr/A-Z/a-z/; if($year > 1994 && $title le "n") { print("this is a new book, "); print("whose title is between \"a\"and \"n\" . \n"); } elsif ($year == 1993 || $year == 1994) { print("The book was published in 1993 or 1994 \n"); } else { print("I dont recognize the book.\n"); } } # end of while loop