in reply to Re^4: Hash versus chain of elsifs
in thread Hash versus chain of elsifs
my %junksites = ( "bollyinside.com", "www.bollyinside.com", ... "worldtrademarkreview.com", "www.worldtrademarkreview.com", );
Note that hash needs key and value pairs, so you're storing only the site names without www as keys; the www. prefixed ones are stored as values. Probably not what you want.
The fast way how to initialize the keys is
my %junksites; @junksites{qw{ bollyinside.com www.bollyinside.com ... worldtrademarkreview.com www.worldtrademarkreview.com }} = ();
|
|---|