I was expecting the substitution to be recompile everytime and new val is used. But not in thise case... why?$foo = "some sentence x"; $val = 1; while ($val < 5) { $foo =~ s/x/$val/; print "$val $foo\n"; $val++; }
In reply to substitution not recompile by adjohan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |