in reply to Using both line mode and paragraph mode in the same program

Yes. General case:
# line mode ... { # paragraph mode local $/ = ''; ... } # line mode ...

Your case:

sub process_csv { ... open(my $fh, '<', ...) or die(...); while (<$fh>) { ... process_file(...); ... } ... } sub process_file { ... local $/ = ''; open(my $fh, '<', ...) or die(...); while (<$fh>) { ... } ... }

Beware. If proces_file calls functions, paragraph mode will still be active. That means don't call process_csv (directly or indirectly) from process_file without fixing $/.