Thread perl substitute (4 answers)
Opened by lddzjwwy at 2013-04-15 13:53

Gast wer
 2013-04-15 16:26
#167074 #167074
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
#!/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;
}

Last edited: 2013-04-15 16:46:13 +0200 (CEST)

View full thread perl substitute