rsriram has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, I have imported the contents of two text files into two arrarys. Array 1 @file contains the following:
<tag>line one line two line three <tag>line four
<element>line one line two line three <element>line four
foreach(@file) { for my $x (0..$#replace) { if($replace[$x] =~ /\\replace\t(.+?)\t(.+?)\n/g) { $_ =~ s/$1/$2/g; } print $_; } }
Can someone tell me where I am going wrong?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Help in using two arrays
by ikegami (Patriarch) on Jun 11, 2008 at 14:10 UTC |