Professional Web Applications Themes

Parsing URL - PERL Beginners

How do I go about parsing a url from the browser location. For example if I have the following url: [url]https://mercedissa.tmo.org/cgi-bin/req/sreq_start.pl?sid=EBSCO:buh%20(Via%20SFX)&genre=ar ticle&issn=00999660&volume=242&issue=26&date=2003& atitle=S.O.S.%20Africa.&title=Wall%20Street%20Jour nal%20-%20Eastern%20Edition&spage=A12&aulast=Waal&aufirst =Alex[/url] As you can see there are elements like volume, genre, date, issue, title, author..... How do I p this to get only the elements mentioned above? Is there a perl module that does this? Thanks. __________________________________________________ ________________ McAfee VirusScan Online from the Netscape Network. Comprehensive protection for your entire computer. Get your free trial today! [url]http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397[/url] Get AOL Instant Messenger 5.1 free of charge. Download Now! [url]http://aim.aol.com/aimnew/Aim/register.adp?promo=380455[/url]...

  1. #1

    Default Parsing URL

    How do I go about parsing a url from the browser location. For example if I have the following url:

    [url]https://mercedissa.tmo.org/cgi-bin/req/sreq_start.pl?sid=EBSCO:buh%20(Via%20SFX)&genre=ar ticle&issn=00999660&volume=242&issue=26&date=2003& atitle=S.O.S.%20Africa.&title=Wall%20Street%20Jour nal%20-%20Eastern%20Edition&spage=A12&aulast=Waal&aufirst =Alex[/url]

    As you can see there are elements like volume, genre, date, issue, title, author.....

    How do I p this to get only the elements mentioned above? Is there a perl module that does this?

    Thanks.

    __________________________________________________ ________________
    McAfee VirusScan Online from the Netscape Network.
    Comprehensive protection for your entire computer. Get your free trial today!
    [url]http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397[/url]

    Get AOL Instant Messenger 5.1 free of charge. Download Now!
    [url]http://aim.aol.com/aimnew/Aim/register.adp?promo=380455[/url]
    Mercedissa1@netscape.net Guest

  2. #2

    Default RE: Parsing URL


    ------------------------------------------------
    On Tue, 09 Sep 2003 16:31:17 -0400, [email]Mercedissa1netscape.net[/email] wrote:
    > How do I go about parsing a url from the browser location. For example if I have the following url:
    >
    > [url]https://mercedissa.tmo.org/cgi-bin/req/sreq_start.pl?sid=EBSCO:buh%20(Via%20SFX)&genre=ar ticle&issn=00999660&volume=242&issue=26&date=2003& atitle=S.O.S.%20Africa.&title=Wall%20Street%20Jour nal%20-%20Eastern%20Edition&spage=A12&aulast=Waal&aufirst =Alex[/url]
    >
    > As you can see there are elements like volume, genre, date, issue, title, author.....
    >
    > How do I p this to get only the elements mentioned above? Is there a perl module that does this?
    >
    > Thanks.
    >
    You should have a look at the CGI module. It will allow you to do all manner of URL/Form parsing, among numerous other web related stuffs.

    [url]http://danconia.org[/url]
    Wiggins D'Anconia Guest

  3. #3

    Default RE: Parsing URL

    perldoc CGI

    use CGI;
    my $cgi = new CGI;
    my $genre = $cgi -> param ('genre');

    Also check search.cpan.org


    -----Original Message-----
    From: [email]Mercedissa1netscape.net[/email] [mailto:Mercedissa1netscape.net]
    Sent: Tuesday, September 09, 2003 4:31 PM
    To: [email]beginnersperl.org[/email]
    Subject: Parsing URL


    How do I go about parsing a url from the browser location. For example
    if I have the following url:

    [url]https://mercedissa.tmo.org/cgi-bin/req/sreq_start.pl?sid=EBSCO:buh%20(Vi[/url]
    a%20SFX)&genre=article&issn=00999660&volume=242&is sue=26&date=2003&atitl
    e=S.O.S.%20Africa.&title=Wall%20Street%20Journal%2 0-%20Eastern%20Edition
    &spage=A12&aulast=Waal&aufirst=Alex

    As you can see there are elements like volume, genre, date, issue,
    title, author.....

    How do I p this to get only the elements mentioned above? Is there a
    perl module that does this?

    Thanks.

    __________________________________________________ ________________
    McAfee VirusScan Online from the Netscape Network. Comprehensive
    protection for your entire computer. Get your free trial today!
    [url]http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397[/url]

    Get AOL Instant Messenger 5.1 free of charge. Download Now!
    [url]http://aim.aol.com/aimnew/Aim/register.adp?promo=380455[/url]

    --
    To unsubscribe, e-mail: [email]beginners-unsubscribeperl.org[/email]
    For additional commands, e-mail: [email]beginners-helpperl.org[/email]

    Paul Kraus Guest

Similar Threads

  1. How do i Parsing xml
    By Todd Dignan in forum Macromedia Flash Data Integration
    Replies: 3
    Last Post: June 21st, 12:51 AM
  2. parsing XML
    By miquael in forum Macromedia Flash Data Integration
    Replies: 21
    Last Post: March 21st, 10:11 PM
  3. PDF Parsing
    By Tamir_Noach@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 1
    Last Post: December 31st, 07:04 PM
  4. Parsing PHP
    By Nikhil G. Daddikar in forum PHP Development
    Replies: 1
    Last Post: July 27th, 05:46 PM
  5. [PHP] Parsing PHP
    By Peter James in forum PHP Development
    Replies: 0
    Last Post: July 26th, 07:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139