what does data in $struct->{data} stands for?
$struct is a hash reference. data is an autovivified key in the referenced hash. (Update: The -> arrow operator is needed because $struct is a reference.) Each new hash reference built from each line of input read from an input file or from the __DATA__ handle (as in the example code) is push-ed to the value of this key.
Also Is it possible to use without pretty?
Did you try it? What happened? (Update: And what does the documentation say?)
Give a man a fish: <%-{-{-{-<
In reply to Re^3: Create JSON file in specific format
by AnomalousMonk
in thread Create JSON file in specific format
by ovedpo15
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |