>>>>> "yy" == yuanyou yao <yaoyuan...@gmail.com> writes:
yy> Can you please try yy> open(ORA, "| dgmgrl | tee dgmgrl.out" ) ? this begs the whole question of why the OP isn't using DBI. yy> 2010/5/27 newbie01 perl <newbie01.p...@gmail.com>: >> Hi all, >> >> Can someone please help and advise if it is possible to have the output of >> the code below to the screen and at the same time to the file as well? >> >> open(ORA, "| dgmgrl > dgmgrl.out" ) or die "Can't pipe to dgmgrl: $!"; >> print ORA "connect >> sys/passw...@${connect_string_02}\n<sys/passw...@$%7bconnect_string_02%7d\n> >> "; first off, use lexical file handles. secondly, use the DBI/DBD module instead of using a cli program to talk to a dbms. then you can get the db output in perl and decide where to print it. uri -- Uri Guttman ------ u...@stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/