1 2 3 4 5 6 7 8 9 10 11 12
-- -- See https://theweeklychallenge.org/blog/perl-weekly-challenge-001 -- -- -- Run as: lua ch-1.lua < input-file -- for line in io . lines () do line, count = string . gsub (line, "e", "E"); io . write (line, "\n", count, "\n") end