try tieing STDOUT to a scalar with IO:Scalar. Here's an example (untested) that may point you in the right direction:
use IO::Scalar; my $FTPInfo; tie *STDOUT, 'IO::Scalar', \$FTPInfo; print "line 1\nline 2\n", "line 3\n"; $SB->Text($FTPInfo); HTH, [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, January 19, 2001 8:08 AM To: [EMAIL PROTECTED] Cc: perl-win32-gui-users@lists.sourceforge.net Subject: Re: [perl-win32-gui-users] Net::FTP with AddStatusBar() Erick, I'm convinced that there must be a simple way to do this but, I've tried everything I can think of but haven't found it yet. The PerlDocs seemed to suggest using Forks, Pipes and/or IPC, but this will probably be abit more complicated than you want. You could redirect STDOUT (and/or STDERR) to a file while you do the ftp stuff, and read the contents of the file back once you've finished. Doesn't seem right to have to do it that way though. Kev. [EMAIL PROTECTED] on 19/01/2001 06:01:40 To: perl-win32-gui-users@lists.sourceforge.net @ INTERNET cc: Subject: [perl-win32-gui-users] Net::FTP with AddStatusBar() I guess my question was really how to catch it from Net::FTP. For example, catch the STDOUT so that I could have $FTPInfo = "331 User name okay, need password." > >Is there a way to catch the STDOUT from using Net::FTP (ie. let $FTPInfo > >equal the information (string) from Net::FTP) and place it in > > > >$SB = $Window->AddStatusBar(-text => $FTPInfo); > > $SB->Text($FTPInfo); > > should do the trick. erick _______________________________________________ Perl-Win32-GUI-Users mailing list Perl-Win32-GUI-Users@lists.sourceforge.net http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users