Can't modify constant item in scalar assignment at test-define.pl line 5, near ""","
####
Bareword "loc" not allowed while "strict subs" in use at test-define.pl line 3.
####
loc => "", # Your code was missing the ">", in BOTH lines where you declare "loc"