Thread IP-Nummer aus SIP-URI (9 answers)
Opened by cohama at 2014-03-28 14:17

cohama
 2014-03-31 09:52
#174501 #174501
User since
2011-08-16
102 Artikel
BenutzerIn

user image
Hallo linuxer,

vielen Dank für deinen Tipp.
Leider steht in meinem Array nichts drin. :-(

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl -w
########################
# Modul Definition
#########################
use strict;
use DateTime;
##########################
# Parameter Definition
#########################
my $ct=1;
my $tstamp = DateTime->now->set_time_zone('Europe/Berlin'); # Find the Timestamp
my $mydate = $tstamp->ymd;
my $iFile = "./workspace/Testfile.log";
my ($line,$info);
my (@dataArray,@Array2);
##########################
##########################
system("clear");

if ( -e $iFile ){
print "$iFile existiert \n";
open (iFile,"<$iFile") || die $!;
}
while ($line=<in>){
@dataArray = split(/\s*\S+:\s+sip:|@/,$line); #
shift (@dataArray); # erstes Elemement aus Array löschen
# print scalar(@dataArray); # Ausgabe des Array-Inhaltes

}
print join("\n",@dataArray); # Ausgabe des Array-Inhaltes


Bye

View full thread IP-Nummer aus SIP-URI