# !perl use strict; # because we should use warnings; # because we should my $base = 'C:\usr\pm\temp\test1\\'; my $search = qq($base.Gridfee0?.7z\\); print "1: $search \n"; my $search2 = qq(${base}Gridfee0?.7z\\); print "2: $search2 \n"; my $search3 = qq(C:/usr/pm/temp/test1/Gridfee0?.7z\\); print "3: $search3 \n"; my $archive = glob qq($base.Gridfee0?.7z\\); #Tried glob qq($base.Gridfee0?.7z\\Gridfee*\\) and glob qq($base.Gridfee0?.7z) too, same result print "archive = $archive\n"; my @archs = glob $search3; #Tried glob qq($base.Gridfee0?.7z\\Gridfee*\\) and glob qq($base.Gridfee0?.7z) too, same result print "archs = @archs\n"; __END__ Use of uninitialized value $archive in concatenation (.) or string at C:\usr\pm\temp\1192612.pl line 18. 1: C:\usr\pm\temp\test1\.Gridfee0?.7z\ 2: C:\usr\pm\temp\test1\Gridfee0?.7z\ 3: C:/usr/pm/temp/test1/Gridfee0?.7z\ archive = archs = C:/usr/pm/temp/test1/Gridfee02.7z\ C:/usr/pm/temp/test1/Gridfee05.7z\