"but i want to know if 1 line solution is there"

Really? So whatever solution you have, make it fit on one line. Since you are asking for some code to do this, I'm guessing you currently have nothing working. Will you remember what one line of code will do in a years time?

When people ask for one liners, I often wonder why. Sure you could golf and obfu something which spans multiple lines into one line, but you've just mad it less readable (and arguably less maintainable) for the next person who has to work with your code.

I'm still not exactly sure what your question is, do you have HTML you wish to work with? If so are you using any modules for parsing the HTML source? If so is the module source one line long? :P

Martin


In reply to Re: Fast way - get array elements > 4 chars by marto
in thread Fast way - get array elements > 4 chars by imrags

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.