Hm, I downloaded your code and ran it; it ran, just didn't get the titles, as I think it found multiple title tags and wasn't sure what to do. I changed url to http://www.burvil.org, and it gets the title there OK. Plus, if you print the results of $mechanize, you'll see there's no title field.

As to your original question, as I wasn't able to recreate your problem, I can't help much. However, some changes below might help give you more verbose info, so you might know how to troubleshoot.

When I did it for your original xml file, it didn't have a title field, so complained later that it was uninitialized (the latter you'd only get if you use strict;), but when I did it for http://www.burvil.org, it worked OK, and gave a title. That page is a normal HTML page, not xml.

It strikes me as odd that it seems to have been working for you before. There is apparently something I'm missing, but not sure what it is.... In any case, hopefully this will point you in the right direction.

Update: You might also try using XML::Parser to parse the xml itself. If you look at the Dumper output I mentioned earlier, it has the actual XML output; you can get your titles from that.

-- Burvil


In reply to Re: program "thinks" it is behind proxy by bowei_99
in thread program "thinks" it is behind proxy by comet85

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.