title: remove msisdn element based on regex
body: <p>I'm trying to remove <code>msisdn</code> field from MO calls on TAP3.11, but it doesn't handle the needed.</p>
  
  <p>I want to set a condition, if the Msisdn doesn't start with 962 then remove the element.</p>
  
  <p>My background is only with python, this's the first time with perl. I use it because after searching I believe that only perl can handle TAP files.</p>
  
  <pre><code># Will scan all the calls for MTC's.
  foreach $key ( @{$struct-&gt;{'transferBatch'}-&gt;{'callEventDetails'} } ) {
  
      foreach ( keys %{$key} ) {
  
          if ( $_ eq "mobileOriginatedCall" )
          {
              if ( defined $key-&gt;{$_}-&gt;{'basicCallInformation'} )
              {
                  if ( defined $key-&gt;{$_}-&gt;{'basicCallInformation'}-&gt;{'chargeableSubscriber'} )
                  {
                      if ( defined $key-&gt;{$_}-&gt;{'basicCallInformation'}-&gt;{'chargeableSubscriber'}-&gt;{'simChargeableSubscriber'})
                      {
                          if ( defined $key-&gt;{$_}-&gt;{'basicCallInformation'}-&gt;{'chargeableSubscriber'}-&gt;{'simChargeableSubscriber'}-&gt;{'msisdn'})
                          {
                              if ($key-&gt;{$_}-&gt;{'basicCallInformation'}-&gt;{'chargeableSubscriber'}-&gt;{'simChargeableSubscriber'}-&gt;{'msisdn'} =~ /^[962]/)
                              {
                                  $key-&gt;{$_}-&gt;{'basicCallInformation'}-&gt;{'chargeableSubscriber'}-&gt;{'simChargeableSubscriber'}-&gt;{'msisdn'}=();
                              }
                          }
                      }
                  }
              }
          }
      }
  }
  </code></pre>