Tips for golfing in Lua

load

load is useful in many cases:

-- replace a repeated code segment:
load(("…"):gsub("…","…"))()

-- split a string:
s="1,2,3,4,5,6,7,8,9"
load("a={"..s.."}")()

Other tips