Cicatrix has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: Perl CGI
by davido (Cardinal) on Mar 21, 2011 at 07:21 UTC

    I don't know of any 1:1 relationship that could be assumed in general terms where a HTML web page is translated into a hash table. There is no implicit set of rules that we could use to take a stab at what you're trying to accomplish. That being the case, we really don't have enough information to be able to provide anything more than generic help.

    For web-scraping, WWW::Mechanize is convenient. HTML::TreeBuilder is a pretty good generalized HTML parser.


    Dave

Re: Perl CGI
by bart (Canon) on Mar 21, 2011 at 13:27 UTC
    • Use for example LWP::Simple to get the remote file into a scalar variable.
    • Parse the HTML file.
    • Put the results in a hash.
    • Profit!
      Now i have got the contents of the HTML into a file1. file1 has user related data. Next, i am using another FILE, file2. file2 contains a list of users specific to a category. Based on the data in file2, i have to modify the file1 content. How effectively can i do this?

        You hire a programmer.

        Jenda
        Enoch was right!
        Enjoy the last years of Rome.

Re: Perl CGI
by Cicatrix (Novice) on Mar 21, 2011 at 07:03 UTC

    i want to read from a web page store it in a HASH sort it according to specific requirement and generate a report for the sorted data