[Israel.pm] open - pipe question

sawyer x xsawyerx at gmail.com
Tue Jan 13 13:07:14 PST 2009


What would be the point of using cygwin if you're not gonna work with `ls`?
and if it's just `ls | grep`, you can use typeglobbing (<>).

On Tue, Jan 13, 2009 at 8:48 PM, Shmuel Fomberg <semuelf at 012.net.il> wrote:
>
> 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?
>
> Shmuel.
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl



More information about the Perl mailing list