----- Original Message ----- From: "Harry Putnam" <[EMAIL PROTECTED]> To: "Mark G" <[EMAIL PROTECTED]> Cc: "perl" <[EMAIL PROTECTED]> Sent: Sunday, June 29, 2003 4:37 PM Subject: Re: make CPAN::Shell->i; print to a filehandle
> Mark G <[EMAIL PROTECTED]> writes: > > > Well I just tryed runing 'CPAN::Shell->i' from the shell, and it failed to > > launch it. Can you run 'CPAN::Shell->i' from your systems default shell ?? > > you can try using ppm instead. > > Ahh I guess it doesn't know about `use CPAN' in the parent script. well you should of included that in your original post. > > But that was the whole point.. to run CPAN::Shell->i from inside a > script and process the output. > > From the command line: > > perl -e 'use CPAN;CPAN::Shell->i' > > works here, to get the output. > > From perldoc it appears that something like this should work but it > doesn't either: > my ($wtr, $wdr, $err, @item, $pid); > > $pid = open2($wtr, $rdr, 'perl -e ', 'use CPAN;', 'CPAN::Shell->i;'); this should be $pid = open2( $wtr, $rdr, ' perl -e 'use CPAN;CPAN::Shell->i' '); > > foreach(@item){ > print $wtr "$_\n"; > print "shell output: $_\n" while <$rdr>; > } > hth, Mark g > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]