#!/usr/bin/perl -l # http://perlmonks.org/?node_id=1209931 use strict; use warnings; # columns # 0 house number left to right # 1 colors # 2 pets (only 4 mentioned, 5th called 'spot') # 3 drink (only 4 mentioned, 5th called 'drink') # 4 nationality # 5 smokes $_ = <## Solution: 1 yellow fox drink Norwegian Kools 2 blue horse tea Ukrainian Chesterfields 3 red snails milk Englishman OldGold 4 ivory dog orangejuice Spaniard LuckyStrike 5 green spot coffee Japanese Parliaments #### s/spot/zebra/; s/drink/water/;