U:/TEMP/TEMP/A/Test01.txt U:/TEMP/TEMP/C/Test03.txt U:/TEMP/TEMP/B/Test02.txt #### #!/usr/bin/perl use strict; use warnings; my %address = ( A => qq{U:/TEMP/TEMP/A}, B => qq{U:/TEMP/TEMP/B}, C => qq{U:/TEMP/TEMP/C}, ); for my $t (keys %address) { print "$t : $address{$t} : ", glob ("$address{$t}/Test*"), "\n"; } #### A : U:/TEMP/TEMP/A : U:/TEMP/TEMP/A/Test01.txt C : U:/TEMP/TEMP/C : U:/TEMP/TEMP/C/Test03.txt B : U:/TEMP/TEMP/B : U:/TEMP/TEMP/B/Test02.txt #### #!/usr/bin/perl use strict; use warnings; my %address = ( A => qq{U:/TEMP/TEMP/A}, B => qq{U:/TEMP/TEMP/B}, C => qq{U:/TEMP/TEMP/C}, ); for my $t (keys %address) { my $file = glob ("$address{$t}/Test*"); print "$t : $address{$t} : $file, \n"; } #### A : U:/TEMP/TEMP/A : U:/TEMP/TEMP/A/Test01.txt, Use of uninitialized value $file in concatenation (.) or string at ... line 15. C : U:/TEMP/TEMP/C : , B : U:/TEMP/TEMP/B : U:/TEMP/TEMP/B/Test02.txt,