in reply to Arithmetic with fractions
or just eval:my $s = "6/2"; my($num,$de)= split /\//,$s;
my $s = "6/2"; 4 + eval($s); # 7
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Arithmetic with fractions
by tachyon (Chancellor) on Sep 22, 2004 at 05:35 UTC |