- or download this
cat1
cat1,sub1
...
cat2
cat3
cat3,sub1
- or download this
------------------------------------
| id | name | parent |
...
| 6 | cat3 | 0 |
| 7 | cat3,sub1 | 6 |
------------------------------------
- or download this
my @x =
('cat1',
...
'cat3',
['cat3,sub1'],
);
- or download this
$x[0] is SCALAR 1/0 (id/parent)
$x[1] is ARRAY
...
$x[4][0] is SCALAR 7/6
$x[4][1] isn't defined
$x[5] isn't defined