Re: Close a Running Sub-Process

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Quoted text here. Click to load it

Repair the corrupted file:

   perl -p -i -e 'tr/\r//d' bad_file

    Tad McClellan                          SGML consulting                   Perl programming
    Fort Worth, Texas

Re: Close a Running Sub-Process

# start
use strict;
use warnings;

my $fh = undef;
# there is a '|' at the end
my $child_process = "ssh username@host tail --follow=name
file_to_be_tailed |";
open $fh, $child_process || Carp::confess("can't open $child_process:
while (<$fh>) {
  if (/successful/) {
close $fh;
# end

Site Timeline