http://qs321.pair.com?node_id=1091948


in reply to converting from str to int

You're opening the file wrong. Try this:
open(FILE, "-|", "bc < res.txt"); @res=<FILE>; print "@res";