Re: symlink to "pack"

2019-09-09 Thread Wesley Peng
Hi on 2019/9/10 3:18, John W. Krahn wrote: 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

Re: symlink to "pack"

2019-09-09 Thread John W. Krahn
On 2019-09-08 12:20 p.m., Jorge Almeida wrote: On Sun, Sep 8, 2019 at 8:08 PM John W. Krahn 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

Re: symlink to "pack"

2019-09-08 Thread John W. Krahn
On 2019-09-07 1:25 p.m., Jorge Almeida wrote: Sorry about the title, it's the best I can do... #!/usr/bin/perl use strict; use warnings; my $num=12; my $target=pack('n', $num); symlink($target, "foo") || die $!; It dies with "No such file or directory" No symlink is

Re: symlink to "pack"

2019-09-07 Thread Uri Guttman
e my other post on why this is likely failing. IMO link would fail for the same reason as symlink as the pack is putting in null bytes in the filename. uri -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: symlink to "pack"

2019-09-07 Thread Mike
htm I am on Strawberry Perl, so I can't really help debug this. Mike On 9/7/2019 3:25 PM, Jorge Almeida wrote: Sorry about the title, it's the best I can do... #!/usr/bin/perl use strict; use warnings; my $num=12; my $target=pack('n', $num); symlink($target, "foo") || die $!; It die

Re: symlink to "pack"

2019-09-07 Thread Uri Guttman
On 9/7/19 4:25 PM, Jorge Almeida wrote: Sorry about the title, it's the best I can do... #!/usr/bin/perl use strict; use warnings; my $num=12; my $target=pack('n', $num); symlink($target, "foo") || die $!; It dies with "No such file or directory" No symlink is created. What

symlink to "pack"

2019-09-07 Thread Jorge Almeida
Sorry about the title, it's the best I can do... #!/usr/bin/perl use strict; use warnings; my $num=12; my $target=pack('n', $num); symlink($target, "foo") || die $!; It dies with "No such file or directory" No symlink is created. What I want is a symlink named "foo&quo