You should also check for the exit status of the command when using pipe to invoke external commands.
open will fail
The sequence will be
# opne the pipe, check if fork passed open PIPE, "|$prog" or die $!; # do something with the command like print PIPE @files; # check if the command completed successfully close PIPE or die "Command failed : $! || $?";
Hope this helps
-T
In reply to Re: Re: Unix command line
by thens
in thread Unix command line
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |