Actually
Yahoo does support POP3. It is not enabled by default and in order to enable it you have to agree to let Yahoo spam you from time to time but it is there and does work well. On the Yahoo Mail page select "Options" then "POP Access & Forwarding." I would imagine that enabling POP access and using one of the
POP3 modules on
CPAN would be easier than scraping the HTML pages. And of course your script can selectively delete any email sent to you by Yahoo...