> Hi
> thanks a lot for your inputs.
> 
> I used 
> Win32::OLE module
> as it opens up a new instance of internet explorer with my 
> preferred webpage. 
> 
> now, i dont need to store all the html. i just need to store 
> the html from 
> $guts =~ /startpathwayimage(.*)endpathwayimage/;
> 
> and then further process this into a file. so now i changed 
> my code to:
> 
> *********
> #!/usr/bin/perl
> use strict;
> use warnings;
> use LWP::Simple; # see search.cpan.org for more info
> my $guts = get('http://www.biocarta.com/pathfiles/h_il10Pathway.asp');
> $guts =~ tr/A-Z/a-z/;
> $guts =~ s/\"/'/g;
> $guts =~ s/\n//g;
> $guts =~ s/\s+//g;
> my @links = $guts =~ /startpathwayimage(.*)endpathwayimage/;

You could 
my $links_are_hiding_in_here = join '', @links;

my @just_the_links_maam = $links_are_hiding_in_here =~ m/href=\'(.*)\'/ig; # or 
whatever regex you need to do this

open(STORE, ">output.txt") || die "Opening output.txt: $!"; 
print STORE join ("\n", @just_the_links_maam)."\n"; 
close (STORE);

# now you should have one url per line in your file

> open(STORE, ">output.txt") || die "Opening output.txt: $!"; 
> print STORE @links; close (STORE);

Or parse the file after its written which doesn't make much sense because nowyou have 
to reopen it, read it
Parse it and do what you want with it then if the file is to be used by another script 
you have to have the same file parsing code in another place.

Write the file with the parsed out put and you life will be much easier :)

> ***********
> This output.txt has all the desired links that i need to 
> store. I need to parse this output.txt to yield me all links 
> sequence like this: http://link1.html http://link2.html http://link3.html

> there are around 15 links in javapop-ups!



> awaiting your tips!
> K.





--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to