Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
      next unless ( $i and length $dp[$i] ); 
      print File::Spec->catdir( @dp[0 .. $i ] ), qq{\n}; 
    }
    
  2. or download this
    /var
    /var/www
    /var/www/vhosts
    /var/www/vhosts/testing.com
    /var/www/vhosts/testing.com/httpdocs
    
  3. or download this
    use strict;
    use warnings;
    ...
            map{ if (! defined $dq ) { $dq = q{/}; } $dq .= $_ . q{/}; } 
            grep{ m/.+/; } 
            @dp ), qq{\n};
    
  4. or download this
    use strict;
    use warnings;
    ...
            map{ File::Spec->catdir( @dp[0 .. $_] ) } 
            grep{ length $dp[$_]; } 
            0 .. $#dp ), qq{\n};