http://qs321.pair.com?node_id=736634


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

Others have mentioned how to capture the output using backticks/open.

To get the name used to execute the current copy of Perl, make use of the variable $^X (that's dollar_sign - caret - uppercase_x). See perlvar under $EXECUTABLE_NAME.
print "$^X\n"; # this will print realpath to perl