in reply to redirect grep output

Have you considered defining $Server?

Also, what is system returning when you make those calls? Have you checked that yet?