# example of a full record Bus 0, device 0, function 0: Host bridge: Intel Unknown device (rev 3). Vendor id=8086. Device id=7190. Medium devsel. Master Capable. Latency=64. Prefetchable 32 bit memory at 0xe6000000 [0xe6000008]. #### use strict; my @devices; undef $/; foreach (split /\n\s\s\b/, ) { # you now have the whole record in $_ # do with it as you please }