Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
where $temp[1] is something like "ZO" and $temp[0] is something lik ZEE\|$1\|ZAA. But it is substituitng with $1 instead of the value of $1.How will correct this problem. -manju$x =~ s/(\|[A-Za-z\^\~]+\|)$temp[1]\|/\|$temp[0]\|/;
Edit Masem 2001-08-23 - Added CODE tags; also changed from a repeat $temp[1] after sub line to $temp[0] based on context.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pattern Matching
by Monky Python (Scribe) on Aug 23, 2001 at 18:18 UTC | |
by Hofmator (Curate) on Aug 23, 2001 at 20:05 UTC |