`which` returns trailing new line, the working code would be:
```ruby
lspci = `which lspci`.chomp
lspci = "/sbin/lspci" if $?.exitstatus != 0
pci_out = `#{lspci} -n -vmm `
```

For me this looks pretty complicated (and it runs external `which` which might cause a problem), the reason for `which` is not obvious in the code (a comment would fix that).

IMHO the example with `Errno::ENOENT` exception handling looks more readable, at least for me :wink: .