in reply to CoreList stuff

If you run the program, it tells you itself what's wrong:
Applying pattern match (m//) to %hash will act on scalar(%hash) at foo +.pl line 10.

What it tells you is that pattern matches generally act only on strings, not on lists or hashes.

You could write your code as

my %modules = %{ $Module::CoreList::version{ 5.008 } }; if( grep /cgi/i, keys %modules ) { print "Found one!\n"; }

instead.