Aha, the path handling is a bit funny:
$ re.pl --rcfile ./test.rc
$ $a
foo
It’s in the documentation:
To set a new run control file that's also in that directory [
$HOME/.re.pl/
], pass it as a filename like so: (…) If the filename happens to contain a forward slash, then it's used absolutely, or realive to the current working directory.