Perl: the Markov chain saw | |
PerlMonks |
Regexp map weirdnessby Kickstart (Pilgrim) |
on May 12, 2001 at 05:31 UTC ( [id://79892]=perlquestion: print w/replies, xml ) | Need Help?? |
Kickstart has asked for the wisdom of the Perl Monks concerning the following question:
Oh perl masters...why does this output 'tt0tt1', printing the second match twice (the tt from the word 'written' and the value of $c) rather than the 'h' from 'the', then the second match's value without the value of $c? I thought map would be smarter than that (or I'm just a dumb perl programmer, which is what I suspect).
Thanks!
Back to
Seekers of Perl Wisdom
|
|