I am completely stumped on this one...
I am running ActiveState perl (which I guess has a broken flock function, among other problems). I need my program to interface with another, by opening for reading a file that the other program opens for writing. My problem is that when my program tries to open the file, it fails saying the file is already in use. Now, the other program, which is writing to the file, is supposed to be designed in such a way so as to allow other programs to read from the file.
It seems to me that Windoze should allow me to open a file for reading no matter what. It's not like my prog is going to mess it up just reading from it... and there are other programs that are supposed to read that file just fine.
To make matters a nightmare, I don't even have a copy of the program I am trying to interface with (and the company won't send me one). From here, all I can do is make a sample script that opens a file for writing and locks it.
So, I guess my question is:
1. If this program I am interfacing to does not lock the file, then why can't perl open it?
2. If they do lock it, then how do other programs open it?
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.