Craig S Monroe wrote: > > Hello All, > > I am a newbie to the list and have a question. I have searched for an answer > through the > docs, but cannot seem to locate a resolution. > > I have written a script that opens a socket to a particular device, > and issues it commands. I would then like it to write the results to a > file, wait, then issue the > commands again and append the results to the same file. > > My issue: > > I am having difiiculty writing the output to a file. > The file is created, but nothing is written and the script hangs. > It worked previously, when I had the script close the socket, then write the > results, but I need to keep it open. > > I have really hacked up the script(indecision on items) so please look past > the rubble. It will be cleaned up when it is done. > I have enclosed the portion of the script. The part I am having difficulty > with > is toward the end when printing to DATAFILE. ... > open(DATAFILE,">>$dataFile")|| > die "cannot append to $dataFile : $!"; You could unbuffer the output to the file here (the below maintains STDOUT as the selected FH): select ((select (DATAFILE), $| = 1)[0]); ... -- ,-/- __ _ _ $Bill Luebkert ICQ=14439852 (_/ / ) // // DBE Collectibles http://www.todbe.com/ / ) /--< o // // Mailto:[EMAIL PROTECTED] http://dbecoll.webjump.com/ -/-' /___/_<_</_</_ http://www.freeyellow.com/members/dbecoll/ _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users