[Israel.pm] open - pipe question

Shmuel Fomberg semuelf at 012.net.il
Tue Jan 13 10:48:03 PST 2009

Hi All.

I have the following code:
open(FH, "dir $dir /s /b | grep mbd | wc |");
$wc = <FH>;

(the environment is cygwin, with Perl 5.6)

However, when I wanted to do the greping myself, I wrote this command:
open(FH, "dir $dir /s /b |");

And then "dir" complained that it can't find the /s and /b directories.

Any idea what is going on?


More information about the Perl mailing list