in reply to Re^3: Searching for Certain Valuesin thread Searching for Certain Values
Change split(/\s+/, ...) to split(/\s*\|\s*/, ...).
By the way, you might be better off using Text::CSV or the like instead of doing your own splitting.