Hi haukex, thank you for your insights. I used the DOM and I get the following results for https://finance.yahoo.com/quote/XOM?p=XOM&.tsrc=fin-srch
==> <span class="Trsdu(0.3s) Trsdu(0.3s) Fw(b) Fz(36px) Mb(-4px) D(b)" + data-reactid="14">43.88</span> <== ==> <span class="Trsdu(0.3s) Fw(500) Fz(14px) C($positiveColor)" data- +reactid="16">+0.15 (+0.34%)</span> <== ==> <span class="Trsdu(0.3s) " data-reactid="68">43.73</span> <== ==> <span class="Trsdu(0.3s) " data-reactid="73">43.59</span> <== ==> <span class="Trsdu(0.3s) " data-reactid="78">43.79 x 900</span> <= += ==> <span class="Trsdu(0.3s) " data-reactid="83">43.80 x 900</span> <= += ==> <span class="Trsdu(0.3s) " data-reactid="96">19,803,615</span> <== ==> <span class="Trsdu(0.3s) " data-reactid="101">38,560,761</span> <= += ==> <span class="Trsdu(0.3s) " data-reactid="109">185.631B</span> <== ==> <span class="Trsdu(0.3s) " data-reactid="114">1.27</span> <== ==> <span class="Trsdu(0.3s) " data-reactid="119">13.07</span> <== ==> <span class="Trsdu(0.3s) " data-reactid="124">3.36</span> <== ==> <span class="Trsdu(0.3s) " data-reactid="143">47.13</span> <==
My questions:
sub { print "==> $_ <==\n" }
How do I capture the $_ in a variable for example if I do this
sub {push @myArray, $_; }
It fails! I am trying to understand how I can capture the output in your sub into an array.

In reply to Re^2: Regular Expression Help by vskatusa
in thread Regular Expression Help by vskatusa

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.