Thread Text in Datei rückwärts durchgehen und bis zu bestimmten Symbol löschen (9 answers)
Opened by donlenardo at 2012-01-26 10:41

GwenDragon
 2012-01-26 11:13
#155676 #155676
User since
2005-01-17
14542 Artikel
Admin1
[Homepage]
user image
Schau dir mal dieses Beispiel an:
Code (perl): (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
#!/usr/bin/perl

use strict;
use warnings;

my @data = reverse <DATA>;
my $notfound = 1;
while ($notfound) {
         $data[0] =~ /\{/ 
         and $notfound = 0 
     and last;   
         shift @data if $notfound;
}
@data = reverse @data;

__DATA__
12
i0
{
xo
46
{
28
98
die Drachin, Gwendolyn


Unterschiedliche Perl-Versionen auf Windows (fast wie perlbrew) • Meine Perl-Artikel

View full thread Text in Datei rückwärts durchgehen und bis zu bestimmten Symbol löschen