not enough sleep to support multiple internal_prefixen, RT#3985
[freeside.git] / FS / FS / part_pkg / voip_cdr.pm
index cef6540..794ae01 100644 (file)
@@ -286,8 +286,12 @@ sub calc_recur {
 
           #determine the country code
           my $intl_match = 0;
-          foreach (@intl) { $number =~ /^$_(((\d)(\d))(\d))(\d+)$/ and do { $intl_match++; last; }; }
-
+          foreach my $i (@intl) {
+            if ( $number =~ /^$i(((\d)(\d))(\d))(\d+)$/ ) {
+              $intl_match++;
+              last;
+            }
+          }
           my $countrycode;
           if ( $intl_match || $number =~ /^\+(((\d)(\d))(\d))(\d+)$/ ) {