my @dirs.push: $_.split('/') for @paths; say @dirs.perl;