{ local $/ = q{}; # paragraph mode in this scope while ( <$file1FH> ) { # do something with the multi-line record # from file1 ... } } ... # $/ now back to normal while ( <$file2FH> ) { # do something with a line from file2 ... }