diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2021-01-19 22:48:57 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-19 22:48:57 +0000 |
| commit | ab1d7622d09b4faf8f377bba91ed7e2661d8b372 (patch) | |
| tree | 637f36f168ac488eca0e51e6ac1e016a28f49d71 /challenge-096/abigail/lua/ch-1.lua | |
| parent | d177c88a00c0d97ab0e3b61fb827c5fe8ac210a5 (diff) | |
| parent | 053b0ef31a9cddae0cbd792ad539b2d68876538c (diff) | |
| download | perlweeklychallenge-club-ab1d7622d09b4faf8f377bba91ed7e2661d8b372.tar.gz perlweeklychallenge-club-ab1d7622d09b4faf8f377bba91ed7e2661d8b372.tar.bz2 perlweeklychallenge-club-ab1d7622d09b4faf8f377bba91ed7e2661d8b372.zip | |
Merge pull request #3323 from Abigail/abigail/week-096
Abigail/week 096
Diffstat (limited to 'challenge-096/abigail/lua/ch-1.lua')
| -rw-r--r-- | challenge-096/abigail/lua/ch-1.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/challenge-096/abigail/lua/ch-1.lua b/challenge-096/abigail/lua/ch-1.lua new file mode 100644 index 0000000000..9c4b1de913 --- /dev/null +++ b/challenge-096/abigail/lua/ch-1.lua @@ -0,0 +1,14 @@ +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 + table . insert (words, 1, str) + end + + -- + -- Print the words + -- + io . write (table . concat (words, " "), "\n") +end |
