in reply to if var isnt used

I'd like to bring Max::Expr to your attention. It parses math expressions into a tree of objects:
use strict; use warnings; use Data::Dumper; use Math::Expr; my $e=Parse("y=ax^2+bx+c"); print Dumper ($e);
Output:
$VAR1 = bless( { 'Breakable' => 0, 'Val' => '=', 'Opps' => [ bless( { 'Val' => 'y', 'VarType' => 'Real' }, 'Math::Expr::Var' ), bless( { 'Breakable' => 1, 'Val' => '+', 'Opps' => [ bless( { 'Breakable' => 1, 'Val' => '+', 'Opps' => [ bless( { 'Breakable' => 1, 'Val' => '^', 'Opps' => [ bless( { 'Val' => 'ax', 'VarType' => 'Real' }, 'Math::Expr::Var' ), bless( { 'Val' => '2' }, 'Math::Expr::Num' ) ] }, 'Math::Expr::Opp' ), bless( { 'Val' => 'bx', 'VarType' => 'Real' }, 'Math::Expr::Var' ) ] }, 'Math::Expr::Opp' ), bless( { 'Val' => 'c', 'VarType' => 'Real' }, 'Math::Expr::Var' ) ] }, 'Math::Expr::Opp' ) ] }, 'Math::Expr::Opp' );


holli, /regexed monk/

Replies are listed 'Best First'.
Re^2: if var isnt used
by metalfan (Novice) on Dec 24, 2005 at 21:15 UTC
    the for your replys, have to test that.