Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: put system(); output into my $variable -- chech for installed aplications

by 13warrior (Acolyte)
on Jan 15, 2009 at 17:17 UTC ( [id://736595]=note: print w/replies, xml ) Need Help??


in reply to put system(); output into my $variable -- chech for installed aplications

Use open or backticks instead of system . System doesn't capture the output of the command.
Open : open ($filehandle ,"/usr/bin/which prg|") or die "Error $!\n"; while(<$filehandle>) { ... } Backticks : my $output = `/usr/bin/which prg`; chomp $output;
  • Comment on Re: put system(); output into my $variable -- chech for installed aplications
  • Download Code

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-25 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found