Is there a Perl equivalent to the following Python code?
names['name'] = ['Bob', 'Bill', 'Terry']
obj = {'Students': [ {'Names': name} for name in names['name']]}
This'll end up looking like something like this
EDIT: As Tim Roberts pointed out: The result would look like this
[ {'Names': "Bob" }, { "Names": "Bill" },. { "Names": "Terry" } ]
I've seen Perl one liners that do different things, but not this.
[ {'Names': "Bob" }, { "Names": "Bill" },. { "Names": "Terry" } ]objandarraren't what you think they are. I recommendarr=>dctandobj=>result_dctor something like that.