看板 Perl 關於我們 聯絡資訊
use LWP::Simple; my @M = split(/\n/,get 'http://www.cwb.gov.tw/V5/forecast/taiwan/week.htm' ); foreach (@M) { next if (!/^<t/); print "\n" if (/^<tr/ || /^<table/); print "\t" if (/<\/th>/); print "\t\t$1" if (/title="(.*)">.*<\/td>/); s/<[^>]*>//g; s/\(.*\)//g; print; } #你要的資訊都拿出來了,只是排版怪怪的 #你自己再去增減\t吧 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.120.15.17