سؤال

The following staement in perl throws an error

my $string =qx(ls grep test) ;

…where test is some file name to be searched...

But the following statements doen't through an error

my $string =qx(ls) ;

I am working in unix solaris machine

هل كانت مفيدة؟

المحلول

Did you mean this?

my $string =qx(ls | grep test) ;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top