Running Multiple Unix commands in qx

Hi All,

Is there anything wrong with below syntax?

qx {perldoc -v ModuleName.pm | grep -i Description }

BTW, this question is related to Perl.

Thanks.

$ perldoc -f qx
       qx/STRING/
       qw/STRING/
               Generalized quotes.  See "Regexp Quote-Like Operators" in per-
               lop.

nope.
but try:

print qx {perldoc -v ModuleName.pm | grep -i Description }

or more perlish:

open DOC, "perldoc -v ModuleName.pm|" or die;
while (<DOC>) {
  print if /Description/;
}

there's a million ways, what are you trying to achieve?

Or, even more perlish:

open my $PD, '-|', 'perldoc -v ModuleName.pm' or die "$!";
print grep { /description/i } <$PD>;
close $PD;

Nevermind that this won't work, as the -v switch tells perldoc to look up a Perl variable, not a module. And even more Perlish would be if you'd used one of the Pod::* modules yourself to convert the documentation.