in reply to Re^2: Is there a better way to approach this?
in thread Is there a better way to approach this?

The return line is actually:

return values %data;

which returns just the values (not key => value pairs) of the hash. @records contains up with a number of array references, one for each record type.

print @{$records[1]};

prints the second of the three records. Note that the @{...} 'casts' the array reference returned by $records[1] into an array.

You may find perlref and perllol helpful.


Perl is environmentally friendly - it saves trees