Hi Perl Monks, I need to parse a web file such as http://www.abc.com/place/abc.cgi I need to get data from this file using PERL. Any help or pointers on this will be of great help. The link also requires user name name and password. Update: I have a link on the web: http://wwwin-dcb.abc.com/Travel/dcq.cgi? It contains following details in a table format. name place ID Cost I need to pick up name and ID using a PERL script. Code Used: #!/usr/bin/perl -w use strict; use LWP::Simple; use HTML::TreeBuilder; my $url = 'http://www.cgidir.com/tutorials/Advanced/tutorials/CGIOUTPU +T.html'; my $page = get($url) or die $!; my $p = HTML::TreeBuilder->new_from_content( $page ); my @links = $p->look_down( _tag => 'tr' ); my %acct; my $count =0; for my $row (@links) { my @cells = $row->look_down( _tag => 'tr' ); my @rows = map { $_->as_trimmed_text( ) } @cells ; $count = $count +1; # print @rows; $acct{title} = $rows[0]; $acct{1} = $rows[1]; $acct{2} = $rows[2]; $acct{3} = $rows[3]; $acct{4} = $rows[4]; print "\n"; print $count; print "\n"; # print "$acct{title}\t"; print "$acct{1}\t"; print "$acct{2}\t"; print "$acct{3}\t"; print "$acct{4}\t"; } $p = $p->delete; # don't need it anymore This works fine for an .html file as given above but not for the link +i want i.e http://wwwin-dcb.abc.com/Travel/dcq.cgi? Any help on this is most welcome. Thanks in Advance P

In reply to Please Comment by developer_p

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.