in reply to basic question:how to print a reversed array from STDIN

Because chomp "returns the total number of characters removed from all its arguments."