the later posts here brought to mind the possibility that you might find that r, the gnu version of s, will satisfy your needs. r is, of course, primarily a statistical language, but the incorporated primitives would probably satisy most, if not all, of your needs. r also has the advantage of readily writing graphic output, as you can see <a href=http://www.r-project.org </href>here
the denizens of this particular hangout will also appreciate that the r repository is named cran, and that there is a perl interface to r. i'm not an expert, it's something in which i've been intending to get literate.