Extracting HTML tag contents to use as a parameter
Posted on 2004-10-15
I'm no expert at Perl, although I can hack together basic scripts. Our Perl developer was recently released for professional negligence, so I am having to pick up the pieces of one of his projects.
What I need to be able to do is to Extract the contents of the HTML <Title> tag from the page which called the script so I can pass it as a parameterin a query string to a pricing search tool.
We currently have it calling a fixed field through:
my $q=new CGI;
my $part = $q->param('Part');
but this means altering the layout of several thousand pages to include a page specific part description. A better option is to just pass the contents of the Title tag.
This is a UNIX script.
Anyone have any ideas?