hi
i'm looking for a way to put result of a system('which perl') into my pre-defined variable.. but only for one system function , i do not want this to be the case for the rest of the system calls.
something like
my $x;
$x = system("which perl");
print "-- $x --";
#this will print: /usr/bin/perl
# -- 0 --
the reason why i'm asking this question is, i want to check if some of the applications are installed on my os (windows/linux), but they probably are not installed in the right place, but rather just added into the $PATH additionally. so this looked like the quickest and most portable way to do this. any alternatives are welcomed. <>
p
thanks