Get rid of the \ in front of call to fix_path (actually even that &, but that's not the problem here), otherwise you stored a ref to a scalar instead of a scalar. In the future, if you can simplify your code to a runnable form, it will help those who are trying to help you.
my $a = &fix_path(); print "source variable AFTER fix_path $a\n"; sub fix_path{ return "abcd"; }
In reply to Re: Assigning a returned value to a hash variable
by pg
in thread Assigning a returned value to a hash variable
by Real Perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |