http://www.perlmonks.org?node_id=304254


in reply to Parse linux /proc/pci?

You should parse the output of the lspci program, instead. /proc/pci is in the process of being deprecated. lspci also offers a -m option, which is designed to make it simpler for scripts to parse.