<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000099" bgcolor="#FFFFCC">
    <div class="moz-cite-prefix">On 3/13/19 12:14 AM, Bill Cole wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:D9D35D8B-ED21-4FF6-9374-74F3857B3070@billmail.scconsult.com">On
      12 Mar 2019, at 22:55, MacPorts wrote:
      <br>
      <br>
      <blockquote type="cite">This will also work if you remove the
        first file1, then create a new
        <br>
        file1. This is what most text editors (vi, vim, emacs) will do.
        They
        <br>
        move the original file to a temporary file, name the edited file
        the
        <br>
        original name, and remove the temporary file. This is how
        symbolic links
        <br>
        work on macOS.
        <br>
      </blockquote>
      <br>
      No, that is how symbolic links work on every POSIX-compliant file
      system.
      <br>
      <br>
      <blockquote type="cite">On Linux, this will break symbolic links.
        <br>
      </blockquote>
      <br>
      You are mistaken.
      <br>
      <br>
      Note the identical behavior from 5 random machines I had handy. 2
      Macs, 3 Linux:
      <br>
      <br>
      An OpenWRT wireless router:
      <br>
      <br>
          root@airhole:~# uname -a
      <br>
          Linux airhole 4.4.140 #0 Fri Jul 13 19:25:14 2018 mips
      GNU/Linux
      <br>
          root@airhole:~# echo 'file1' > file1
      <br>
          root@airhole:~# ln -s file1 link1
      <br>
          root@airhole:~# cat link1
      <br>
          file1
      <br>
          root@airhole:~# mv file1 file2
      <br>
          root@airhole:~# echo 'fileb' > file1
      <br>
          root@airhole:~# cat link1
      <br>
          fileb
      <br>
      <br>
      A client's antique server:
      <br>
      <br>
          [root@intel1 tmp]# uname -a
      <br>
          Linux intel1.REDACTED 2.4.27 #7 SMP Mon Feb 23 19:45:51 EST
      2009 i686 unknown
      <br>
          [root@intel1 tmp]# echo 'file1' > file1
      <br>
          [root@intel1 tmp]# ln -s file1 link1
      <br>
          [root@intel1 tmp]# cat link1
      <br>
          file1
      <br>
          [root@intel1 tmp]# mv file1 file2
      <br>
          [root@intel1 tmp]# echo 'fileb' > file1
      <br>
          [root@intel1 tmp]# cat link1
      <br>
          fileb
      <br>
      <br>
      A different wireless router:
      <br>
      <br>
          /opt/home/admin # uname -a
      <br>
          Linux asus-router 3.0.102 #1 Mon Feb 1 00:35:27 KRAT 2016 mips
      GNU/Linux
      <br>
          /opt/home/admin # echo 'file1' > file1
      <br>
          /opt/home/admin # ln -s file1 link1
      <br>
          /opt/home/admin # cat link1
      <br>
          file1
      <br>
          /opt/home/admin # mv file1 file2
      <br>
          /opt/home/admin # echo 'fileb' > file1
      <br>
          /opt/home/admin # cat link1
      <br>
          fileb
      <br>
      <br>
      High Sierra:
      <br>
      <br>
          skinnyclam:~ $ uname -a
      <br>
          Darwin skinnyclam.local 17.7.0 Darwin Kernel Version 17.7.0:
      Thu Dec 20 21:47:19 PST 2018; root:xnu-4570.71.22~1/RELEASE_X86_64
      x86_64
      <br>
          skinnyclam:~ $ echo 'file1' > file1
      <br>
          skinnyclam:~ $ ln -s file1 link1
      <br>
          skinnyclam:~ $ cat link1
      <br>
          file1
      <br>
          skinnyclam:~ $ mv file1 file2
      <br>
          skinnyclam:~ $ echo 'fileb' > file1
      <br>
          skinnyclam:~ $ cat link1
      <br>
          fileb
      <br>
      <br>
      Snow Leopard:
      <br>
      <br>
          bigsky:tmp root# uname -a
      <br>
          Darwin bigsky.REDACTED 10.8.0 Darwin Kernel Version 10.8.0:
      Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386
      i386
      <br>
          bigsky:tmp root# echo 'file1' > file1
      <br>
          bigsky:tmp root# ln -s file1 link1
      <br>
          bigsky:tmp root# cat link1
      <br>
          file1
      <br>
          bigsky:tmp root# mv file1 file2
      <br>
          bigsky:tmp root# echo 'fileb' > file1
      <br>
          bigsky:tmp root# cat link1
      <br>
          fileb
      <br>
      <br>
      <br>
      <br>
    </blockquote>
    Thanks for the comments Bill,<br>
    I don't currently have a Linux machine handy to test this, but I
    would have assumed that symbolic links would work the same on all
    UNIX/Linux machines. However, I recently (about 8 months ago) ran
    into situation on a Ubuntu machine where changes to symbol link
    target files were causing the links to break.<br>
    <br>
    I'm sure what you're saying is correct. I'd still like to know why
    Perl could not find the socket file when it was pointed to through a
    symbolic link.<br>
    <br>
    <br>
    <br>
    Carl.<br>
    <br>
    <br>
    <br>
  </body>
</html>