Hi Uri, thanks for all your input on this list. See below for my response.
On Monday 18 Apr 2011 07:56:16 Uri Guttman wrote: > >>>>> "mr" == marcos rebelo <ole...@gmail.com> writes: > mr> Ugly but may work, with a simple eval > mr> use strict; > mr> use warnings; > > mr> my $var = '$str. q( abc_xyz)'; > mr> my $str; > > mr> for(my $i=1;$i <= 5; $i++){ > mr> $str = $i; > mr> my $line = 'Line: '.eval $var; > mr> print "$line\n"; > mr> } > > NEVER do that for such a simple problem. eval string is a last resort > when no other technique can work well. Well, you are right naturally, but there is no need to be so rude. Start your email with a greeting, continue with a compliment, use soft words, etc. Otherwise, you may be scaring many people away. See some of my advice in: http://unarmed.shlomifish.org/909.html > > and please learn to edit quoted email. there is no reason to see the > whole original email. also read a full thread before answering is a good > thing. this query was answered well several times already. > Again, you can say it in a much more friendly and pleasant manner. Regards, Shlomi Fish -- ----------------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Why I Love Perl - http://shlom.in/joy-of-perl "My name is Inigo Montoya. You forced my father to write XSLT. Prepare to die! And be thankful I don't force you to write XSLT." Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/