Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 20 lines (16 sloc) 312 Bytes
#!/usr/bin/perl
#
#
use warnings;
use Cwd;
use File::Basename 'basename';
use Data::Dumper;
use Data::TreeDumper;
$Data::TreeDumper::Useascii = 0;
my $tree = {root => {}};
foreach my $input (<>) {
chomp $input;
my $t = $tree;
$t = $t->{$_} //= {} for split '/' => $input;
}
print DumpTree($tree);
You can’t perform that action at this time.