Hi All, 
 
I have a list of url source files... I need to get a certain "<img src="
from each file.  The one thing that separates it from the other <img src
tags is it is preceded by <center> for example: <center><img
src="/rcp/ObjectServer?table=Images&id=381" but the sequence of img tags is
different in each of the files.  Is there a way to get the img 'src' tag if
the img tag is eq to <center>?  Maybe I could write a regex to do this?
pointers? 
 
I've broken my script down to try and get the <center> <img scr= from just
one source file.
 
Below is one attempt where I thought I was getting close ...  maybe not...
:~).  Any suggestions would be greatly appreciated. 
 
 
 
#!/usr/bin/perl 
 
 use strict;
 use warnings;
 use HTML::TokeParser::Simple;
 use LWP::Simple;
 
 my $url = "
http://www.rcpworksmarter.com/rcp/products/detail.jsp?rcpNum=1013
<http://www.rcpworksmarter.com/rcp/products/detail.jsp?rcpNum=1013> ";
 my $page = get($url) 
  or die "Could not load URL\n";
 
 my $parser = HTML::TokeParser::Simple->new(\$page) 
  or die "Could not parse page";
 
 $parser->get_tag ("img") || die;
 my $token = $parser->get_token;
 if ($token->[0] eq "center"); 
 print;
 
# ---end ---
 
 
Brian Volk
HP Products
317.298.9950 x1245
 <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
 
 

Reply via email to