develooper Front page | perl.vmsperl | Postings from June 2002


Thread Previous | Thread Next
BAZLEY, Sebastian
June 10, 2002 11:12
Message ID:
Thanks to all (including the private email from .nl).

Unfortunately, "Close IN" does not terminate the sub-process.

As suggested by the e-mail I tried:


  if (eof($in)){
  $line = <$in>;        # Either
  read($in,$line,1000); # Or
  print $line if $line;

But that did not work. Bother; it looked very promising...

Then Craig's mail about the example reminded me that we have the source for
our home-grown "tail -f" (written originally for VAX/VMS 5.5!), so I had a
look at that, and found the magic incantation:


Thanks again for helping solve the problem.

If the VMS::Stdio documentation is ever updated, perhaps it might be useful
to add an example using these qualifiers?

-----Original Message-----
From: Craig A. Berry []
Sent: 10 June 2002 18:32
To: BAZLEY, Sebastian
Subject: Re: TYPE/CONT in Perl

At 01:17 PM 6/10/2002 +0100, BAZLEY, Sebastian wrote:
>The file can be read OK in DCL with TYPE/CONT, and in Perl:
>        open IN, "TYPE/CONT |";
>works OK, except that we haven't found how to terminate the sub-process
>without exitting the Perl script.

Closing IN doesn't do that?

>However, it would be nice if we could read the file directly from Perl,
>with the appropriate vmsopen() call from VMS::Stdio. We've tried "shr=put",
>but cannot seem to read beyond the initial end of the file.

Hmm.  I think VMS::IndexedFile can do sequential reads, i.e., I don't know 
if the file really has to be indexed.  Its only advantage for your problem 
is that it's using RMS calls rather than C library calls, which may or may 
not be a way around what you are seeing.  I don't really know why you are 
seeing the behavior you get but it would be interesting to know if it's 
reproducible with a simple C example.

This email is confidential and intended solely for the use of the 
individual to whom it is addressed. Any views or opinions presented are 
solely those of the author and do not necessarily represent those of 
If you are not the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing, or 
copying of this email is strictly prohibited.

If you have received this email in error please notify the SchlumbergerSema Helpdesk by telephone on +44 (0) 121 627 5600.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About