![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re: Text::Autoformatby GrandFather (Saint) |
on Apr 28, 2006 at 20:06 UTC ( #546374=note: print w/replies, xml ) | Need Help?? |
Your immediate problem is that x doesn't do what you want. To achieve what you want ("doubling" the commands) you need something like:
However that is only a tiny part of the problem. Your bigest problem is that an array is not appropriate, you need to use a string. Something like this:
However that still fails because you clobber $str each time through the loop. Changing the first two lines in the loop to :
gets you closer, but leaves another logic problem (bug) which I'll leave you to puzzle over. :) DWIM is Perl's answer to Gödel
In Section
Seekers of Perl Wisdom
|
|