#!/usr/bin/perl $/=undef; for( glob '*' ) { next unless -f; open( my $fh, '+<', $_ ) or die "$_ $!\n"; ( my $txt = <$fh> ) =~ s/<>/`<>`/gs; seek($fh,0,0); print $fh $txt; }