I have written a script that writes user responses into a flat file. Our networking department has recently implemented a load balancer and we now have three production boxes. The script writes into a file in a folder called /data folder and now there are three /data folders. The three files of course are not in sync. Our solution is to hard code location of the file (one of the machines has been designated as the store for the file). How do I reference a machine name (UNC) in the open() statement? I am used to something like open(HANDLE,"<$filename") but $filename pertains to a file stored in the same box as the code. Your kind response is deeply appreciated. perlboy

Edit ar0n -- title change (was "open()")


In reply to opening a file across a network by perlboy

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.