K
kw
Hello Group,
i would like to do in perl something similar to the eval command in a
korn shell.
First i define some scalar variables $a and $b
my $a="123";
my $b="abc";
then i define a scalar $c to be the composition of $a and $b
my $c='$a $b';
then many line of code later and probably changes of $a and $b i want
to use $c for instance so as to print it:
print $c;
I know there ist no variable interpolation after $c has been
substituted but how can i make this happen?
In the shell i would write
eval print $c
i would like to do in perl something similar to the eval command in a
korn shell.
First i define some scalar variables $a and $b
my $a="123";
my $b="abc";
then i define a scalar $c to be the composition of $a and $b
my $c='$a $b';
then many line of code later and probably changes of $a and $b i want
to use $c for instance so as to print it:
print $c;
I know there ist no variable interpolation after $c has been
substituted but how can i make this happen?
In the shell i would write
eval print $c