Well the html file that comes back to my program lets say test.html has certain entries like location country etc...
so the file looks like this
;Cost Center Desc.
;FX IT EFX;
;Town
;London ;
So what i want to do is search for town, and then grab the answer of the next line..
Something like $line =~ /Town/ , and the answer i am looking for is the next line which is London. You see these came from a table in html format, and i stripped out the html so i just have text, so this is what i am left with..
#!/home/cuthbe/bin/perl open(T,"test.html") || die ("Unable to open file. $!\n"); foreach (<T>) { s/<[^>]+>//g; s/ //g; s/<!//g; if($_ =~ /Town/) { printf $$; } #printf; }
Edited by Chady -- added code tags.
In reply to Re: Re: HTML Formattting
by minixman
in thread HTML Formattting
by minixman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |