open LSUSB, "lsusb |" || die "call to lsusb failed: $!"; while () { # find what you are looking for }