Are you seriously going to argue the inputs are constant? If you really believe that, why did you post such stupid solutions? You should have suggested
use strict; use warnings; print '{ "mike": 20, "johndeo@test.com": "test" }';
But no, the OP used variables for a reason. It's because they are variable. And because of that, your first solution is buggy.
In reply to Re^4: strings to json
by ikegami
in thread strings to json
by bigup401
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |