Leitchn has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to increment through two arrays of characters, replacing one with the other throughout a piece of text. My problem comes when one of these is a [.
Perl throws it out as an unmatched open bracket. Quotemeta doesn't help, so any ideas?
Here's my code:
}
Ta,
Nick.
Perl throws it out as an unmatched open bracket. Quotemeta doesn't help, so any ideas?
Here's my code:
for $count(0..52){
$someText =~ s/quotemeta('$array1{$count}')/quotemeta('$array2{$co +unt}')/g;
}
Ta,
Nick.
Back to
Seekers of Perl Wisdom