in reply to system call variable

Use backticks: my $foo = `bar.exe args`;

After Compline,
Zaxo

Replies are listed 'Best First'.
Re: Re: system call variable
by Anonymous Monk on Dec 18, 2002 at 22:58 UTC
    So is it possible to do?
    my $foo = 'wc $filename -l'; #in a cgwin environment on windows?
    Thanks

      Look closely at the quotes ZAxo was using and yours.

      Eg. Zaxo used ````` these, you used '''''' these. The difference is important.


      Examine what is said, not who speaks.

        BTW, the subtle distinction in quotes can be resolved by using:     my $foo = qx( wc $filename -l ); See "quote-like operators" (in perlop or "perldoc perlop").

                - tye