in reply to Output of a command

Use the grave character.

$t = `$command`;

Grave can be found under the tilde (to the left of '1' on standard keyboards).

<(^.^-<) <(-^.^<) <(-^.^-)> (>^.^-)> (>-^.^)>

Replies are listed 'Best First'.
Re^2: Output of a command
by Niel (Initiate) on Jul 30, 2008 at 04:48 UTC
    I have changed the $command to `$command`. Do you mean the below one??
    $command = ls;
    my $test = "/usr/anil/scripts/anil1.txt";
    open (STDOUT, "> $test");
    $t = `$command` If YES, then it didn't work!!!