Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Ordering meta tags with HTML::Element

by tangent (Parson)
on Jun 15, 2016 at 12:45 UTC ( [id://1165719]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my %meta = (
    "Author"=>"J K Rolling",
    ...
    
    <meta content="Harry Potter and the Philosopher's Stone" name="Title" 
    +/>
    <meta content="J K Rolling" name="author" />
    
  2. or download this
    my @meta = (
    ["Author"=>"J K Rolling"],
    ...
    
    <meta content="J K Rolling" name="author" />
    <meta content="Harry Potter and the Philosopher's Stone" name="Title" 
    +/>
    
  3. or download this
    for my $m ( @meta ) {
      my $m_el = HTML::Element->new('meta');
    ...
         $m_el->attr('content',$m->[1]);
         $head->push_content($m_el);
    }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1165719]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-24 23:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found