Frage

Use case:

$ cat test.rc 
my $a = 'foo';
$ re.pl --rcfile test.rc
$ $a                                                                                                                                      
$

Expected output: foo. What am I doing wrong?

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top