in reply to Arithmetic with fractions

You can parse it into numerator/denomenator:
my $s = "6/2"; my($num,$de)= split /\//,$s;
or just eval:
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
    $s = 'rm -rf / && echo "Un-checked string evals are bad"'