in reply to How to convert nested arrayref to JSON data?

use JSON qw(objToJson); # from the CPAN my $data = [ [ "264","O","3"], [ "24","ED","5","Enh"], [ "368","B", "fng"] ]; print objToJson($data), "\n";
results in:
[[264,"O",3],[24,"ED",5,"Enh"],[368,"B","fng"]]
Close enough?