performing a CPAN search on polynomial reveals some modules you can use.
In reply to Re: Solving polynomials in Perl by Chady in thread Solving polynomials in Perl by bambam