You've got a couple of different problems going on here.
in reply to solving a quadratic equation
I'd suggest running your code under perl -d (the debugger) and using the "b" command to set breakpoints at the line where you're closing FH and doing
That will show you what @temp contains. Hint, it's not what you expect :)
Also, you should put a breakpoint in quadratic in the line that returns the result. Check out the values of $a, $b, and $c - they're also not what you expect, because @temp isn't what you expected, and also because you're passing \@temp (a reference to an array) but then accessing @_, which will only contain one element, that reference.