Help for this page
sub buildtree { my($f, @a) = @_; local $_; ... s/}$/)/; eval; }
#!/usr/bin/perl -w ... my %tree = buildtree( $func, @array ); print Dumper \%tree;
# 1 2 3 4 #23456789012345678901234567890123456789012345 my$f=shift;@_=((sort{&$f($a,$b)}@_),'');$_= join'=>[0,{',@_;chop;%{eval"{$_ 0".']}'x$#_};