use strict; my ($buffer, $tag) = ('',0); my @res = (); while(read DATA, my $c, 1){ if($c eq '{'){ $tag = 1; } elsif($c eq '}'){ push @res, $buffer; $tag = 0; $buffer = ''; } else { $buffer .= $c if $tag == 1; } } print join "\n", @res, "\n"; __DATA__ Hier steht was {irgendwas} und {wieder was} und in einer neuen Zeile steht {nochwas}. Das wars.