[Israel.pm] integrating unix commands

Offer Kaye oferk at oren.co.il
Tue Jan 13 08:54:54 PST 2004


> Well, people already mentioned backticks. There's also system and exec
> (see perlfunc), but the more flexible way is via pipes, IMHO.
>

More flexible how?
If I don't want the output from the command, I just use system:
   system("command");
   # optionally check return status here

Can you even do this with pipes?

In the case of using backticks to get back the output you could maybe use a
pipe, but how would it be "more flexible" then simple backticks and some
creative redirection operators (in case STDERR is required instead of
STDOUT, for example) usage?

Not flaming, just wondering... :-)
----------------------------------
Offer Kaye




More information about the Perl mailing list