in reply to Re: Getting a Perl program to close a command it starts when the perl program exits?
in thread Getting a Perl program to close a command it starts when the perl program exits?
I have another question.
If I modify yours slightly to use a lexical instead of a global file handle, it doesn't work anymore.
$tail_id = open(my $tail_fh, "tail -1lf /dev/null 2>/dev/null|") || die "Can't check info_file: $!\n"; END{ kill 3, $tail_id; }
Why does this make a difference?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Getting a Perl program to close a command it starts when the perl program exits?
by ikegami (Patriarch) on Aug 29, 2007 at 17:39 UTC | |
by kyle (Abbot) on Aug 29, 2007 at 18:10 UTC | |
by ikegami (Patriarch) on Aug 29, 2007 at 19:00 UTC | |
by BrowserUk (Patriarch) on Aug 29, 2007 at 18:03 UTC | |
by ikegami (Patriarch) on Aug 29, 2007 at 19:13 UTC | |
|
Re^3: Getting a Perl program to close a command it starts when the perl program exits?
by BrowserUk (Patriarch) on Aug 29, 2007 at 17:10 UTC |