|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
How can I increment a var in a substitution?by kingman (Scribe) |
| on Aug 09, 2001 at 19:06 UTC ( [id://103568]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.kingman has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I just read
[id://20361|How would I replace the string 'Red1' with $Red1?] But I still can't figure this out. Here's the code: This turns all img links into «TOKEN_0++»; $n interpolotes but doesn't increment. If I add the /e modifier, the complier chokes when it tries to evaulate « Maybe I'm trying to do too much but I'd like to avoid the following loop if I can:
evaluate $html_file_slurped_to_a_scalar Any suggestions?
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||