if (m/scan/ && m/print/){..both scan and print found..}