in reply to Re^2: Perl non-blocking IPC
in thread Perl non-blocking IPC
open(my $fh, '-|', qw( tail -f -n command_file)) || die("Unable to run tail: $!.\n");
You can pass a single string, but whenever possible, call system(), open(), etc. with a list for the command; it's safer, because you're guaranteed not to get filtered through /bin/sh.
|
|---|