in reply to 'strict refs' + 'strict sub' = suck.
The code you've posted is perfectly legal (although you really need to check the return value of open: open(FILE, "filetoread") or die "Error opening file: $!\n";). I suspect your error is higher up in the code and perl just happens to error out at that line.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
:(){ :|:&};:
Note: All code is untested, unless otherwise stated
|
|---|