Help for this page

Select Code to Download


  1. or download this
    my @path = '.';
    while (<DATA>) {
    ...
        $path[-1] = $node;
        print $prefix, join("/" => @path), "\n";
    }
    
  2. or download this
    my @path = '.';
    while (<DATA>) {
    ...
        splice @path, length($prefix)/2-1, 0+@path, $node;
        print $prefix, join("/" => @path), "\n";
    }
    
  3. or download this
    my @path = '.';
    while (<DATA>) {
    ...
        $path[-1] = $node;
        print $prefix, join("/" => @path), "\n";
    }