aboutsummaryrefslogtreecommitdiff
path: root/challenge-096/abigail/lua/ch-1.lua
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-096/abigail/lua/ch-1.lua')
-rwxr-xr-x[-rw-r--r--]challenge-096/abigail/lua/ch-1.lua12
1 files changed, 11 insertions, 1 deletions
diff --git a/challenge-096/abigail/lua/ch-1.lua b/challenge-096/abigail/lua/ch-1.lua
index 9c4b1de913..c2de0434f6 100644..100755
--- a/challenge-096/abigail/lua/ch-1.lua
+++ b/challenge-096/abigail/lua/ch-1.lua
@@ -1,9 +1,19 @@
+#!/opt/local/bin/lua
+
+--
+-- See ../README.md
+--
+
+--
+-- Run as: lua ch-1.lua < input-file
+--
+
for line in io . lines () do
--
-- Extract words and put them into an array, in reverse.
--
local words = {}
- for str in string . gmatch (line, "[^ ]+") do
+ for str in string . gmatch (line, "[^%s]+") do
table . insert (words, 1, str)
end