my @list_of_dirs; # Create @list_of_dirs; if( defined($opt_href->{"data"}) ) { # We have to do some searching to find complete list of dirs @roots_paths = (split /,/, $opt_href->{"data"}); foreach $path (@root_paths) { find( sub { get_valid_dir( \@list_of_dirs) }, $path); } } else { # Directory info is in a file, just have to validate info is correct blah...blah.. }