ツリー形式の表示には Simple Tree Menu(※1) を使用していますが、いただいたデータ(※2)をSimple Tree Menuで表示可能なul,liに変換する必要があったので、使用したperl scriptを書き留めておきます。 ※1 http://www.dynamicdrive.com/dynamicindex1/navigate1.htm ※2 元データの例 末端 1段目 2段目 3段目 node1_1 node1_2 TOP CATE1 node2_1 node2_2 TOP CATE1 CATE2 node3_1 TOP CATE1 CATE3 原則、タブ区切データで、末端内に複数を定義する場合、空白区切 #!/usr/local/bin/perl use strict; use warnings; use utf8; use Data::Dumper; main
![Simple Tree Menuで表示するツリーデータ(ul,li)を作成 - end0tknr's kipple - web写経開発](https://cdn-ak-scissors.b.st-hatena.com/image/square/315d685258287a334f04be91f27e857a2d2f060f/height=288;version=1;width=512/http%3A%2F%2Fcdn-ak.f.st-hatena.com%2Fimages%2Ffotolife%2Fe%2Fend0tknr%2F20090815%2F20090815134459.jpg)