Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Output of a command

by Lawliet (Curate)
on Jul 30, 2008 at 04:30 UTC ( [id://701016]=note: print w/replies, xml ) Need Help??


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!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://701016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2024-03-29 08:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found