in reply to Re^4: Ordering meta tags with HTML::Element
in thread Ordering meta tags with HTML::Element

Can you Data::Dump::dd() whatever document that is supposed to represent and explain the problem?

Here is what I tested with firefox, where the charset is located makes no difference, as long as it appears in the document

$VAR1 = "<!DOCTYPE html> <html> <title> O\314\276\315\253\315\204\314\277\314\221\315\244\315\243\314\ +276\315\233\314\201\314\201\315\200\314\241\315\236\314\264\315\217\3 +14\235\314\235\314\230\314\252\314\256\314\271\314\252\315\216\315\23 +2\314\236\314\237\314\243\314\261\314\244\314\230\314\272\315\225\314 +\252H\314\205\315\247\315\233\315\247\314\276\315\222\315\253\322\211 +\322\211\315\211\314\263\314\230\314\255\314\253\315\205\314\257A\315 +\204\314\212\315\256\315\251\314\205\314\214\315\204\315\256\315\247\ +315\236\314\265\315\200\315\201\314\270\315\231\314\251\314\261\314\2 +35\315\231\314\261\314\253\314\234\315\231\314\260\314\273\314\235\31 +5\225\315\211\314\255\314\256\314\226\315\226\315\207I\314\276\315\23 +3\314\205\314\211\314\241\315\201\314\236\314\227\315\210\315\231\314 +\240\315\223\315\211\314\257\314\235\314\256\314\262\314\256\315\225\ +315\205\314\243\314\255\314\252 </title> <p>entities<tt>&lt;title&gt;O&#830;&#875;&#836;&#831;&#785;&#868;&#867 +;&#830;&#859;&#769;&#769;&#832;&#801;&#862;&#820;&#847;&#797;&#797;&# +792;&#810;&#814;&#825;&#810;&#846;&#858;&#798;&#799;&#803;&#817;&#804 +;&#792;&#826;&#853;&#810;H&#773;&#871;&#859;&#871;&#830;&#850;&#875;& +#1161;&#1161;&#841;&#819;&#792;&#813;&#811;&#837;&#815;A&#836;&#778;& +#878;&#873;&#773;&#780;&#836;&#878;&#871;&#862;&#821;&#832;&#833;&#82 +4;&#857;&#809;&#817;&#797;&#857;&#817;&#811;&#796;&#857;&#816;&#827;& +#797;&#853;&#841;&#813;&#814;&#790;&#854;&#839;I&#830;&#859;&#773;&#7 +77;&#801;&#833;&#798;&#791;&#840;&#857;&#800;&#851;&#841;&#815;&#797; +&#814;&#818;&#814;&#853;&#837;&#803;&#813;&#810; &lt;/title&gt;</tt> <p>straightup utf8 like title <tt> O\314\276\315\253\315\204\314\277\3 +14\221\315\244\315\243\314\276\315\233\314\201\314\201\315\200\314\24 +1\315\236\314\264\315\217\314\235\314\235\314\230\314\252\314\256\314 +\271\314\252\315\216\315\232\314\236\314\237\314\243\314\261\314\244\ +314\230\314\272\315\225\314\252H\314\205\315\247\315\233\315\247\314\ +276\315\222\315\253\322\211\322\211\315\211\314\263\314\230\314\255\3 +14\253\315\205\314\257A\315\204\314\212\315\256\315\251\314\205\314\2 +14\315\204\315\256\315\247\315\236\314\265\315\200\315\201\314\270\31 +5\231\314\251\314\261\314\235\315\231\314\261\314\253\314\234\315\231 +\314\260\314\273\314\235\315\225\315\211\314\255\314\256\314\226\315\ +226\315\207I\314\276\315\233\314\205\314\211\314\241\315\201\314\236\ +314\227\315\210\315\231\314\240\315\223\315\211\314\257\314\235\314\2 +56\314\262\314\256\315\225\315\205\314\243\314\255\314\252 </tt> <meta charset=\"utf-8\"> ";

The link I linked before warns against using encodings in which the bytes corresponding to "<script>" in ASCII can encode a different string, like JIS_C6226-1983, JIS_X0212-1990, HZ-GB-2312, JOHAB (Windows code page 1361), encodings based on ISO-2022, and encodings based on EBCDIC..authors must not use the CESU-8, UTF-7, BOCU-1 and SCSU encodings

So the order doesn't matter