in reply to Variables in eval funcation

I am getting the actual run time error.
You are getting a compile time error, that's the difference =)

perl compiles the code and optimizes 4/0 to its result. if it had been 4/2 then the code would have seen a '2' at runtime.