diff options
| author | Abigail <abigail@abigail.be> | 2021-05-08 19:42:08 +0200 |
|---|---|---|
| committer | Abigail <abigail@abigail.be> | 2021-05-08 19:42:08 +0200 |
| commit | 6dc4f40a3fc2e1fc286490d55f93a4e9293ae119 (patch) | |
| tree | 6d1d2043a2b688e72c3d50396d07c462f7474c97 | |
| parent | 2475a6ecc18c6d172375d64856de45a3180445a6 (diff) | |
| download | perlweeklychallenge-club-6dc4f40a3fc2e1fc286490d55f93a4e9293ae119.tar.gz perlweeklychallenge-club-6dc4f40a3fc2e1fc286490d55f93a4e9293ae119.tar.bz2 perlweeklychallenge-club-6dc4f40a3fc2e1fc286490d55f93a4e9293ae119.zip | |
Make variable local in Lua
| -rw-r--r-- | challenge-111/abigail/lua/ch-1.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-111/abigail/lua/ch-1.lua b/challenge-111/abigail/lua/ch-1.lua index 194e55b458..eb324dfa85 100644 --- a/challenge-111/abigail/lua/ch-1.lua +++ b/challenge-111/abigail/lua/ch-1.lua @@ -10,7 +10,7 @@ local MATRIX_SIZE = 5 -matrix = {} +local matrix = {} -- -- Read in the matrix @@ -24,7 +24,7 @@ end -- whether the number is present in the matrix or not. -- while true do - target = io . read ("*number") + local target = io . read ("*number") if target == nil then break end if matrix [target] then print (1) |
