Thread regexp spaltenbasiert (14 answers)
Opened by parafux at 2018-04-10 11:15

GwenDragon
 2018-04-10 16:05
#188254 #188254
User since
2005-01-17
14758 Artikel
Admin1
[Homepage]
user image
Reports.


Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;

my ($col1, $col2, $col3);
format STDOUT =
@<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<< 
$col1,                  $col2,                 $col3
.

while (<DATA>) {
  chomp;
  ($col1, $col2, $col3) = split /\s+/;
  write STDOUT;
}

__DATA__
xxxxx yyyyyy zzzzz
xxxxx yyyyyy    zzzzzzz
xxxxx yyyyyy       zzzzzz


Ergibt
Code: (dl )
1
2
3
xxxxx                   yyyyyy                 zzzzz
xxxxx yyyyyy zzzzzzz
xxxxx yyyyyy zzzzzz

View full thread regexp spaltenbasiert