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

Which code produced that error?

Replies are listed 'Best First'.
Re^4: Find Replace text with list
by wa2nlinux (Novice) on Feb 07, 2011 at 15:13 UTC
    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; }
        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"' ], );