This gives output as only hello, seems the variable $y is not dynamically substituted in $x based on the next assignment $y = world. Is there any way to accomplish this like in makefiles we have this type of assignments. I got this situation when i want to create files dynamically with different names using this type of substitution. Any help ???? Thanks in Advance!!!$foo = "hello"; my $x = "$foo".$y; # $y is not yet defined. $y = "world"; print $x;
In reply to Creating dynamic variables by rbala
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |