azzazzello
Technical User
suppose I have
$entry = <>;
$one = ($entry == '2') ? "two"; "other";
$two = "bam";
$other = "kaboom";
print (the variable that matches the value of $one)
If 2 is typed, I want to have $one somehow interpolated to "two" and then do something like ${two}. If anything else is typed, I want it to interpolate to "other" and print out the value of $other. But I can't seem to nest them...Help?
$entry = <>;
$one = ($entry == '2') ? "two"; "other";
$two = "bam";
$other = "kaboom";
print (the variable that matches the value of $one)
If 2 is typed, I want to have $one somehow interpolated to "two" and then do something like ${two}. If anything else is typed, I want it to interpolate to "other" and print out the value of $other. But I can't seem to nest them...Help?