
combine two pattern matches to one match?
Can someone combine the following two pattern matches to one match?
perl -ne "next if /-- \s* INFILE/ix;
if (/INFILE \s+ ' \s* (\S+) \s* '/ix) { print \$1; last; }"
That is, change above to:
perl -ne "if (/ you pattern match /) { print \$1; last; }"
Thanks.
PS: You can post, but an email copy to me is appreciated.