Leser: 23
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!C:\\Programme\\Perl\\bin
open(FILE, "<xact2") or die "Kann File nicht oeffnen";
while(<FILE>) {
chomp;
next if ($_ =~ m/^\!/);
($event, $id, $msg) = split(/^(\w+)\s+(\d+)\s+(.+)/g);
push(@data, [$event, $id, $msg]);
#push(@data, $_);
}
close(FILE);
for ($i=0; $i<=$#data; $i++)
{
print "$i\n";
print "0 = $data[$i][0], 1 = $data[$i][1], 2 = $data[$i][2], 3 = $data[$i][2]\n";
}
($event, $id, $msg) = split(/^(\w+)\s+(\d+)\s+(.+)/g);
($event, $id, $msg) = /^(\w+)\s+(\d+)\s+(.+)/;
($event, $id, $msg) = split(/^(\w+)\s+(\d+)\s+(.+)/g);
($event, $id, $msg) =~ m/^(\w+)\s+(\d+)\s+(.+)/g;
my ($event, $id, $msg) = split( /\s+/, $_, 3);