This is my first post here. Let me know if I format something outside of what you guys prefer. I like that you guys do your best to inform new people how to not frustrate the community. Anyway, I am running Strawberry Perl v5.12.3 on windows (I really only say this because parts of mech perl seem buggy, but I admit it could be my perl), and I need to follow this link.:

<a class="menuItem" href="#" onclick="sListView.check_entire_list(document.MassUpdate, "mass[]",true,4063);" onmouseout="unhiliteItem(this);" onmouseover="hiliteItem(this,"yes");" style="width: 150px">Select All&nbsp;(4063)</a>

The problem with this box, may be that it is hidden and only shows up when you click a javascripted button. Yes, hidden, it is not some ajax appearing nonsense. I figured it would still parse it, but I seriously tried 50 or so regexes. Less ideally(WAY less, but I would put up with it), I could check this box, and add a massive amount of logic to click through pages that are variable. :/

<input id="massall" class="checkbox" type="checkbox" onclick="sListView.check_all(document.MassUpdate, "mass[]", this.checked);" value="" name="massall">

I have tried these kinds of things:

$mech->follow_link( text_regex => /select\sall/i ) if $mech->success() +; $mech->find_link(text_regex=>/select/i);

It always returns saying that there is a use of uninitialized variable $_ in the mech perl code, or it says that I initialized a hash with an odd number of items and so forth. So... I went through the more annoying method (this one will probably add 3 or 4 days to my project, but whatever). Let's check the box:

$mech->tick( 'massall', /\s/ ); $mech->tick( 'massall', / / ); $mech->tick( 'massall', '' ); $mech->tick( 'massall', 0 ); $mech->tick( 'massall', '&nbsp;' );

Perl wont allow use of uninitialized value, null value or it cannot find &nbsp; or \s. It not finding \s is bizarre to me because then I leave a null value it states that the regex is not valid. What do I do?


In reply to Mech::Perl and following links w/ null value by Anonymous Monk

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.