Thank you for the hints.
I escaped _ because of the scalars containing _ in their names.
if I use
my @cachefiles = glob("/home/cache/*_$scalar_1_2");
it does not recognize $scalar_1
I'd have to write
my @cachefiles = glob("/home/cache/*_$scalar_1\_2");