I'm trying to set the path for the PERL5LIB using a simple config file like this:
cat /Users/me/.local/bash.d/perl5lib_dirs | while read line
do
case ":$PERL5LIB:" in
*:$line:*) :;;
*) echo 'Adding path: '$line; PERL5LIB="$line:";;
esac
done
Apparently, since the loop is opened in a subshell, the value of the PERL5LIB variable is lost when the loop exits.
So how else can I accomplish this?