I am trying to print unique directory names and only directory names(not the absolute path).Can anyone suggest how can I get unique dirs and only the dir names?
#!/usr/bin/perl use warnings; use strict; use Cwd; use File::Find; my $cwd = getcwd(); open(my $FILES_FOLDERS, '+>', "files_folders.txt") or die $!; find(sub { print $FILES_FOLDERS "$File::Find::dir\n" ;#Ho +w to print unique directories and get only the directory name } , "$cwd" );
In reply to How to print unique directores by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |