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

Here the error when I try to get @replace from file
Can't use string ("my @replace = ( ") as an ARRAY ref while "strict refs" in use at parsingtex.pl line 16 +, <FData> line 4.

Replies are listed 'Best First'.
Re^3: Find Replace text with list
by moritz (Cardinal) on Feb 07, 2011 at 14:41 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; }