Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: executing commands and getting output

by tja_ariani (Acolyte)
on Sep 05, 2003 at 08:02 UTC ( [id://289127]=note: print w/replies, xml ) Need Help??


in reply to Re: executing commands and getting output
in thread executing commands and getting output

Hi, I tried the $output = 'command' method but it doesn't seem to work. $output is empty and does not contain anything.
With the open command, could you give me a clue of what does it actually do ?
Thanks for your help
  • Comment on Re: Re: executing commands and getting output

Replies are listed 'Best First'.
Re: Re: Re: executing commands and getting output
by rnahi (Curate) on Sep 05, 2003 at 08:29 UTC
    $output = `command`; # ^ ^ # | |
    The quotes around command are backticks (ASCII 96, hex 60), not single quotes.

    As an alternative, you may use

    $output = qx(command);

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-26 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found