Quote:
Originally Posted by KevinADC
open the tmp directory and search it?
|
@KevinADC,
Okay, a bit short (open it ? search it ? search what ?) , but I think I got it.
Code:
@dir2_contents = </tmp/dir1/dir2/*>;
foreach $item (@dir2_contents) {
if ( -d $item ) {
$needed_dir = basename($item);
}
}
printf "needed_dir = $needed_dir\n";