PCSPLMNCallDataRecord mSOriginating callPosition 3'D chargeableDuration 0 1 1'BCD dateForStartOfCharge 1 8 13'BCD exchangeIdentity "MAPP01E 0117802"'S interruptionTime 0 0 0'BCD recordSequenceNumber 15701541'D tariffClass 10'D tariffSwitchInd 0'D timeForStartOfCharge 9 32 31'BCD timeForStopOfCharge 9 33 32'BCD callIdentificationNumber 5025228'D chargedParty 0'D switchIdentity 0001'H subscriptionType 00'H timeFromRegisterSeizureToStartOfCharging 0 0 9'BCD disconnectingParty 1'D internalCauseAndLoc 0 3'BCD mSCIdentification 1119207079800F'TBCD locationNumberOriginating 114141079808F0'H teleServiceCode 11'H iMSICalling 13600410003154F0'H timeForTCSeizureCalling 092015'H cellIDForFirstCellCalling 130046044D55B5'H radioChannelProperty 01'H firstRadioChannelUsed 00'H firstAssignedSpeechCoderVersion 01'H speechCoderPreferenceList 0100'H cellIDForLastCellCalling 130046044D55C8'H ->1|0|125 00'H ->1|0|123 00'H translatedNumber 116180446697F9'H originatingLineInformation 62'D chargeNumber 136084465140'TBCD networkCallReference 244F4A0001'H eosInfo 00'H typeOfCallingSubscriber 1'D originForCharging 1'D trafficActivityCode 11 2 13'BCD outgoingRoute "0GRI2"'S incomingRoute "BAPL01I"'S callingPartyNumber 14xxxxxxxxxx'TBCD ((((This is the $msisdn line)))) calledPartyNumber 1xxxxxxxxF'TBCD #### #!/usr/bin/perl -w use strict; my @lines; my $para; my $lastHeading; my $msisdn; print "What msisdn?"; chomp($msisdn = ); $/ = ""; # read paragraphs while ($para = <>) { @lines = split(/\n/, $para); if (@lines == 1) # A Heading { $lastHeading = $lines[0]; next; } if ($lines[1] =~ "mSOriginating") { if ($lines[43] =~ "$msisdn") { print "MSORIGINATING\n"; print "$lines[0]\n"; print "$lines[8]\n"; print "$lines[7]\n"; print "$lines[43]\n"; print "\n"; } } } #### if ($lines[43] || $lines[30] || etc... =~ "$msisdn") #### if ($lines[1] =~ "mSOriginating") { if ($lines[43] =~ "mSOriginating") { print "blah"; } if ($lines[30] =~ "mSOriginating") { print "blah"; } } #### if ($lines[30] =~ "$msisdn") {