{ local $/ = "\n-----\n"; # We make sure to localize the reading behaviour to the inner block while(my $paragraph = <$yourInputFile>) { # code that processes the data } } # At this point we go back to a normal reading behaviour