$frac = '1/4';
$dec = eval $frac;
print "$frac = $dec";
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
| [reply] [d/l] |
You could always look up the eval function to find out. | [reply] |
why do you need them to be in that format, and what exactly do you mean by it? If all you are looking for is the decimal equiv, just use perl
$eval = (1/4);
print $eval;
0.25
I may be off the mark, but I hate the way sometimes people try to make this completely obscure code on here when sometimes simple is clearly better. If using eval has a better purpose for THIS PARTICULAR ISSUE, i would love to hear it. | [reply] [d/l] |