while( my $line = <__FILE__> ) { if $line =~ /^\Q-Marker1-\E/ .. $line =~ /^\Q-Marker2-\E/ { # mach was mit $line } }