すいません、訂正です。
× /<head>(.+)<\/head>/ =~ html

以下どちらのパターンも同じ結果です。
○ /<head>(.+)<\/head>/imo =~ html
○ html  =~ /<head>(.+)<\/head>/imo