Hoff das ist was du suchst...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/perl
use warnings;
use strict;
while(<DATA>) { # alles was unten in __DATA__ steht symbolisiert eine Datei
chomp;
my @array = ();
@array = split(/;/); # $_ ist standard
foreach (@array) {
s%^\s+%%g; # fuehrende und
s%\s+$%%g; # abschliessende Blanks entfernen
} # foreach
print left($array[0],20).left($array[1],20).left($array[2],20), "\n";
# und zum Beweis das die Leerstellen weg sind
# print "BEWEIS\n";
# print "$array[0];$array[1];$array[2]\n";
} # while
1;
sub left {
my $r = $_[0];
while(length($r) < $_[1]) {$r.=' '}
$r;
} # left
__DATA__
Nachname; Vorname; Domain\Benutzername;size;85;5.7.2006;;16:36;5.7.2006;;16:36;;
Mustermann; Max; domain\name
Maier; Michi; domainmaier\michi
Mueller; Margit ;domain\margit
Gruss,
havi