open(S2,"script2 |"); while () {print;} close S2; #### print "Script2\n"; system("script3"); #### print "Script3\n"; #### script2 script3