Thread Ein Problem mit der Extraktion von Textausschnitte: Perl->Manipulation von Texten (6 answers)
Opened by sKy at 2006-12-05 17:44

topeg
 2006-12-05 18:10
#72256 #72256
User since
2006-07-10
2611 Artikel
BenutzerIn

user image
So dürfte es wohl einfach gehen:
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;

my $listfile='/pfdad/zur/datei.txt';
my @liste=();

open(FILE,'<', $listfile) or die "Konnte $listfile nicht oeffnen ($!)\n";
{
local $/="#\n";
push(@liste,[split(/\n/,$block)]) while(my $block=<FILE>);
}
close(FILE);
print Dumper(\@liste);

View full thread Ein Problem mit der Extraktion von Textausschnitte: Perl->Manipulation von Texten