7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /usr/bin/perl
use strict;
use warnings;
my $file = '/path/to/file.txt';
my @entries;
{
local $/ = "---------end}\n";
open(FILE,"<$file") or die $!;
while(my $entry = <FILE>){
push(@entries,$entry);
}
close FILE;
}
foreach my $entry(@entries){
my ($start) = $entry =~ /(.{24})----------{ begin/;
my ($end) = $entry =~ /(.{24})--------------------- end }/;
}
1
2
3
4
5
foreach my $entry(@entries){
my ($start) = $entry =~ /(.{24})----------{ begin/;
my ($end) = $entry =~ /(.{24})--------------------- end }/;
my ($middlepart) = $entry =~ /----------{ begin(.*?).{24}--------------------- end }/;
}
7 Einträge, 1 Seite |