Another strange thing i found is that if i add ">", in front of abc.sh, it works for me. Can you tell what will ">" do to my script?
open (SNMP1, ">abc.sh |") or die "Cannot run abc.sh $!";
while (<SNMP1>) {
# do some processing
}
close (SNMP1) or die "ERROR: testing $! $?\n ";