in reply to Re^3: Find Replace text with list
in thread Find Replace text with list

When I read my @replace as array from a file and try to subtitute
open(FData,"< data") || die("Cannot Open File"); my @replace=<FData>; for my $replace (@replace) { $s =~ s/$replace->[0]/$replace->[1]/gee; }

Replies are listed 'Best First'.
Re^5: Find Replace text with list
by moritz (Cardinal) on Feb 07, 2011 at 15:29 UTC
      Yes, I already modified the source but the point is same, I wonder if can read file each line as array and then just call it like :
      ( [ qr/\/ka/ => '"ku"' ], [ qr/\/hi/ => '"he he he"' ], );