open(my_perl, "|perl_file.pl $variable1 $variable2"); close(my_perl); #this was working fine in my machine where i had initially developed my application.