#!/usr/bin/perl-w use strict; use warnings; my @array = ('Nachname','Vorname','domain','usw',); my @_daten = (""); # Speicher fuer alle Datensaetze my @matrix = (\@array,\@_daten); #stopf die beiden arrays in ein array open(DATEN, ") { chomp; my @matrix = (); @matrix = split(/%/); # $_ ist standard foreach (@matrix) { s%^\s+%%g; # fuehrende und s%\s+$%%g; # abschliessende Blanks entfernen } # foreach print left($matrix[0],90).left($matrix[1],90).left($matrix[2],90), "\n"; # und zum Beweis das die Leerstellen weg sind #print "BEWEIS\n"; print "$matrix[0];$matrix[1];$matrix[2]\n"; } # while  sub left { my $r = $_[0]; while(length($r) < $_[0]) {$r.=' '} $r; } # left print "@{$matrix[0]}\n"; print "@{$matrix[1]}\n"; close(DATEN); # open (DATEN,"dieneuedatei.txt"); # while(){ # print NEU @_daten; # } # close (NEU); # close (DATEN);