nusoff has asked for the wisdom of the Perl Monks concerning the following question:
main.pl:open3: Can't call method "close" on an undefined value at C:/perl/lib/ +IPC/Open3.pm line 368. open3: Can't call method "close" on an undefined value at C:/perl/lib/ +IPC/Open3.pm line 368. while executing "::perl::CODE(0x18627b4)" invoked from within ".b invoke " invoked from within ".b instate {pressed !disabled} { .b state !pressed; .b invoke } " (command bound to event)
But perl.exe works pretty.use strict; use Tkx; use IPC::Open3; my $mw = Tkx::widget->new('.'); my $tw = $mw->new_text(); my $bt = $mw->new_ttk__button( -text => 'retrieve', -command => sub { my( $pid, $wtr, $rdr, $err ); $pid = open3( $wtr, $rdr, $err, 'dir' ); $tw->insert( 'end', scalar do { local $/; <$rdr> } ); }, ); Tkx::pack( $tw ); Tkx::pack( $bt ); Tkx::MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: IPC::Open3, wperl issue
by Anonymous Monk on Aug 19, 2009 at 08:49 UTC | |
by nusoff (Initiate) on Aug 19, 2009 at 08:52 UTC | |
|
Re: IPC::Open3, wperl issue
by thospel (Hermit) on Jan 20, 2012 at 13:03 UTC |