#!/usr/bin/perl open (FILE, "/home/markus/Info/quote"); open (OUT, ">/home/markus/Info/gedreht_quote"); while () { $t = $_; if ($t =~ m/~/) { # Trennzeichen gefunden $i++; } else { @array [$i] .= $t; } } $"="\n~\n"; while (defined ($value = pop (@array))) { print OUT $value; print OUT "~\n"; }