in reply to Re: seek and replace for exceptional characters
in thread seek and replace for exceptional characters
Somebody has a suggestion for me? Thanks a lot! Best regards#!/usr/bin/perl -w #use strict; my $SCU = 'C:/Users/user/Desktop/a.txt'; open (FILE, '<', $SCU) or die "$SCU File not found : $!"; my @lines = <FILE>; close (FILE); my $A= quotemeta '#i1*#lper/2+#ginsl-#cdz/2'; my $B= '$coin22'; my @newlines; push @newlines, s/$A/$B/rg for @lines; open (FILE, '>', $SCU) or die "Could not open file $SCU: $!"; print FILE @newlines; close (FILE);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: seek and replace for exceptional characters
by marinersk (Priest) on Sep 23, 2013 at 22:09 UTC | |
|
Re^3: seek and replace for exceptional characters
by toolic (Bishop) on Sep 23, 2013 at 18:33 UTC |