On 2019-09-08 12:20 p.m., Jorge Almeida wrote:
On Sun, Sep 8, 2019 at 8:08 PM John W. Krahn <jwkr...@shaw.ca> wrote:
On 2019-09-07 1:25 p.m., Jorge Almeida wrote:
On Unix/Linux a character in a file name can be any character except a
slash '/' character because that is used to separate path elements, or a
null "\0" character because that is what the C language uses to signify
the end of a string.
Yes, but does a symlink target counts as a "file name"? Probably, but
it's not very clear. (I didn't want to dereference the symlink, only
readlink() it...)
Jorge
So your Perl string "\0\f" is read by C as a zero length string.
The operating system is written in C. The symlink(2) function is part
of the operating system and is written in C. Therefore, when perl calls
symlink(2) it has to send a valid C type string. Because your string
starts with a NULL character it is a C string with zero characters.
John
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/