Skeeve has asked for the wisdom of the Perl Monks concerning the following question:
I'm wondering how I could create a relative symlink in perl.
Currently I'm using symlink in a perl script running in a docker container. The created link is an absolute link - for the container. On the docker host otoh this link is a broken link.
Now I'm wondering whether or not it's possible to create relative links in perl. I fear this can only be done by changing to the directory where the original file resides or by relying on a systemcall invoking ln -rs …, right?
But maybe someone here has another good idea?
s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: create a relative symlink
by dave_the_m (Monsignor) on Dec 16, 2019 at 08:15 UTC | |
by Skeeve (Parson) on Dec 16, 2019 at 10:58 UTC | |
by ikegami (Patriarch) on Dec 16, 2019 at 11:17 UTC | |
by Skeeve (Parson) on Dec 16, 2019 at 12:14 UTC | |
by soonix (Canon) on Dec 16, 2019 at 11:22 UTC | |
Re: create a relative symlink
by Anonymous Monk on Dec 18, 2019 at 03:24 UTC | |
by choroba (Cardinal) on Dec 19, 2019 at 15:10 UTC | |
by afoken (Chancellor) on Dec 19, 2019 at 22:36 UTC |
Back to
Seekers of Perl Wisdom