Computer and printer maker Hewlett-Packard Co. said Thursday after the markets closed that its second quarter profit fell 21% from last year, hurt by lower revenue and costs related to the planned separation of the company. However, the company’s quarterly earnings per share, excluding items, came in above analysts’ expectations, but its quarterly revenue fell short of analysts’ forecast.