#!/usr/bin/perl use warnings; use strict; my $daten; my @tables = qw(Tabelle1.Spalte1 Tabelle1.Spalte2 Tabelle1.Spalte3 Tabelle2.Spalte1 Tabelle2.Spalte2 Tabelle2.Spalte3 Tabelle3.Spalte1); for (@tables) { my ($a, $b) = split(/\./, $_); push @{$daten->{$a}}, $b; } for (keys (%$daten)) { print $_,"\n"; print "--", $_, "\n" for (@{$daten->{$_}}); } exit();