Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

by 13warrior (Acolyte)
on Jan 15, 2009 at 17:17 UTC ( #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
Node Status?
node history
Node Type: note [id://736595]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2020-08-06 07:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which rocket would you take to Mars?










    Results (39 votes). Check out past polls.

    Notices?