in reply to Check multiple lines exist in a record
#!/usr/bin/perl use warnings; use strict; use feature qw{ say }; sub callForwardingsCF { my ($found) = @_; $found->{1} = 1 if /\t*CF=(CFU-TS10-ACT-(NONE|\d+))/; $found->{2} = 1 if /\t*CF=(CFB-TS10-ACT-(NONE|\d+))/ } my %found; while (<>) { if (/<SUBEND/) { say "SUBEND found"; if (2 == keys %found) { print "Both expressions found.\n"; } elsif (keys %found) { print "Found only expression ", keys %found, ".\n"; } else { print "None of the expressions found.\n"; } %found = (); } callForwardingsCF(\%found); }
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|