I'm sure there's an easy way to do this....
I have a variable, lets call it $var1..
$var1 = "$var2 < 50". Another variable called $var 2...
$var2 = 25....
Is there anyway to do a line like,
if $var1 then ......
so that it substitues for the contents of $var1 and does something like if $var2 < 50 then .....
I'm parsing a load of text which includes a lot of conditional statements. I know I could write a long-winded evaluation, I just wondered if there was a simpler way to substitute the CONTENTS of a variable into an 'if' statement.
Any help would be MUCH appreciated.
Thanks
Darren Rathbone
I have a variable, lets call it $var1..
$var1 = "$var2 < 50". Another variable called $var 2...
$var2 = 25....
Is there anyway to do a line like,
if $var1 then ......
so that it substitues for the contents of $var1 and does something like if $var2 < 50 then .....
I'm parsing a load of text which includes a lot of conditional statements. I know I could write a long-winded evaluation, I just wondered if there was a simpler way to substitute the CONTENTS of a variable into an 'if' statement.
Any help would be MUCH appreciated.
Thanks
Darren Rathbone