Closed aggrolite closed 12 years ago
Oh, and although the JSON call is set to relaxed, it's best to have of habit of wrapping those in an eval{}, or else your script could crash and you'll get a nasty error message like "error":"malformed JSON string, neither array, object, number, string or atom
Appreciate the work.
Just some changes (I think mostly to the code I wrote) to ensure your script doesn't puke. I just learned recently about how using map in void context is a no-no, as it returns values.
-ensure our variables are defined -wrap json decode in eval -don't use map in void context, use for loop instead -trim trailing whitespace (vim does this automatically for me)