in reply to Re^3: How to grep for a filename for each of the keys of a hashin thread How to grep for a filename for each of the keys of a hash
my @array = grep (/\Q$file_name\E/i, keys %pathname_versions); [download]
That's the right thing.