in reply to
taking an output in a variable
That should work fine.
Did you check
$&
for an error? In any case,
my $res = $ENV{JAVA_HOME};
should also do the trick (and do it much more efficiently).
Update
:
mickeyn
found the problem.
Comment on
Re: taking an output in a variable
Select
or
Download
Code
In Section
Seekers of Perl Wisdom