Any help would be appreciated.

The sooner you switch to pQuery, HTML::TreeBuilder::LibXML/HTML::TreeBuilder::XPath ... the better off you'll be

#!/usr/bin/perl -- use strict; use warnings; my $fafafa = <<'__FAFAFA__'; <iframe width="560" height="349" src="http://www.youtube.com/embed/8lG +m40pxw" frameborder="0" allowfullscreen></iframe> __FAFAFA__ print $fafafa; $fafafa =~ s~<iframe([^>]+)>~'<iframe '.Fafafa("$1");~gie; print $fafafa; sub Fafafa { my %kava; my @bool; while( $_[0] =~ m{ \G (?: ( [^'"\s=]+ ) # $1, key \s* = \s* " ( [^"]+)" # $2, val ) | ( [^'"\s=]+ ) # single | \s }gxs ){ no warnings 'uninitialized'; print "1($1)2($2)3($3)\n"; if( $3 ){ push @bool, $3 } elsif( $1 ) { $kava{$1}=$2; } } use DDS; Dump(\%kava); return join ' ', @bool, map { qq'$_="$kava{$_}"' } keys %kava; } __END__
<iframe width="560" height="349" src="http://www.youtube.com/embed/8lG +m40pxw" frameborder="0" allowfullscreen></iframe> 1()2()3() 1(width)2(560)3() 1()2()3() 1(height)2(349)3() 1()2()3() 1(src)2(http://www.youtube.com/embed/8lGm40pxw)3() 1()2()3() 1(frameborder)2(0)3() 1()2()3() 1()2()3(allowfullscreen) $HASH1 = { frameborder => 0, height => 349, src => 'http://www.youtube.com/embed/8lGm40pxw', width => 560 }; <iframe allowfullscreen width="560" frameborder="0" src="http://www.yo +utube.com/embed/8lGm40pxw" height="349"</iframe>

In reply to Re: Resize video for mobile browser by Anonymous Monk
in thread Resize video for mobile browser by htmanning

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.