use strict; use warnings; my $firstString='Trap'; my $secondString='hair'; open my $text, "){ print if (m/($firstString|$secondString)/i) }