in reply to Scraping Ebay

Not commenting on the rest of your code, my eyes were particularly drawn to this line:
my ($a,$b,$line, $itemnumber,@title,$results,%data,%olditems,$key);
First, i've already spoken out about my distaste for "my my my" as a warning signal (although super search is not letting me figure out how to search for it at the moment).

Second, saying "my $a/$b" will break sort blocks, so in general, you should stay away from those.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.