http://qs321.pair.com?node_id=916510


in reply to hash comparison

You would be better off splitting on /\W+/, rather than just /\W/

Consider:

say scalar split /\W/, "the cat is the on the mat"; # 7 say scalar split /\W/, "the cat is the on the mat"; # 13 say scalar split /\W+/, "the cat is the on the mat"; # 7 say scalar split /\W+/, "the cat is the on the mat"; # 7