Re: Not able to write using Open2



Paul Lalli wrote:

> Ashwin wrote:
> > Here is my complete code ,
>
> Your "complete code" doesn't compile. Try again. Copy and paste,
> don't retype.
>
> Also, from your description, are you sure you shouldn't be using the
> Expect module from CPAN?
>
> Paul Lalli

SOrry, I missee one quatation
here is compiled code,
is there no way I can get it done with open2?


use warnings;
use strict;
use IPC::Open2;
use Cwd;

my $currentdir=cwd();
my $pid;
chdir ("/source/internal/") or die "Cannot Change Directory";
$pid = open2 (\*READ,\*MY_WRITE,"BuildInternal.pl") or die;

while (<READ>)
{
print $_;
}

print "MY_WRITE\n";

while (<READ>)
{
print $_;
}

close MY_WRITE;
close READ;

--

.



Relevant Pages

  • Re: How to add variables to strings?
    ... Ted Zlatanov wrote: ... actual code (what's above won't compile)? ... Please make sure your newsreader isn't assuming that $ means "beginning ... Paul Lalli ...
    (comp.lang.perl.misc)
  • Re: Not able to write using Open2
    ... Ashwin wrote: ... Your "complete code" doesn't compile. ... don't retype. ... Prev by Date: ...
    (comp.lang.perl.misc)
  • Re: Working in Unix but not in windows
    ... Can you atleast tell me the exact error messages as I can compile and ... run the code in borland ... Ashwin ... Prev by Date: ...
    (comp.lang.c)