Your net.pl missing bracket. It would be difficult for people to understand and help.
By the way, I would suggest you to indent your code ;-)
Update:
A common situation for pipe close to fail is that, IO buffer is not flushed.
In reply to Re: PIPE problem
by pg
in thread PIPE problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |