#!perl


open LIST, "symbols.txt";
	while (<LIST>) {
	chomp;
	system "wget -Oraw2/$_.htm http://finance.yahoo.com/q/in?s=$_";
	}
close LIST;



open LIST, "symbols.txt";
open IND, ">sector.txt";
	while (<LIST>) {
	chomp;
	$symbol=$_;
	open FILE, "raw/$_.htm";
	while (<FILE>) {
			if (/>Sector:<(.*?)<\/a>/) {
			$_=$1;
			m/(.*)>(.*?)$/;
			print IND "$symbol|$2\n";}
		}
	close FILE;
	}
close IND;
close LIST;
