Re: file locks and a counter



On Mon, 29 Sep 2008 18:21:59 -0700, Jürgen Exner wrote:

Richard Nixon <richard@xxxxxxxxxxxxxxx> wrote:
How do you keep track of line numbers with a longer perl script? What I
did before was put a line somewhere like
some where;
and then the compiler would tell me which line had an error. Then I would
move it closer to line 230. Is there a better way?

What about just jumping to line 230?
- In EMACS M-x goto-line 230. Besides, the current line number is always
indicated in the status line.
- I vi I believe it's :230 but my vi is _very_ rusty.
- Heck, even Notepad has a Goto Line functionality.

What editor are you using that it doesn't know about line numbers?

jue

Gosh, juergen, I was unaware that notepad had that functionality.

While I am a "windows guy," I've never really developed any continuing
education with it because I haven't ever been in a place on usenet where
The Topic can be bothered for a practical user concern.

Line 230 is the sysopen line here:

sub check_lock {
$time = $_[0];

for ($i = 1;$i <= $time; $i++) {
if (-e "$data_dir$lock_file") {
sleep 1;
}
else {
sysopen(FH, $path, O_WRONLY|O_EXCL|O_CREAT) or die $!;
print LOCK "0";
close(LOCK);
last;
}
}
}

There's no great surprise here, as I've got no file for it to open, so I
think I'm at the level where I can't pursue this further.

Does this address the file lock issue adequately?
--
Richard Milhous Nixon

A man came into the the office one day and said he was a sailor. We cured
him of that.
~~ Mark Twain
.



Relevant Pages

  • Re: How difficult is to add my menu to Windows Explorer?
    ... Are those Shell menus or belonging to each application indepedently? ... The only commonality is that Explorer and Notepad ... In IE/Web Browser control there used to be functionality ... received some requests for my app to add popup menu to other app windows ...
    (microsoft.public.vb.general.discussion)
  • Re: How difficult is to add my menu to Windows Explorer?
    ... Are those Shell menus or belonging to each application indepedently? ... The only commonality is that Explorer and Notepad ... In IE/Web Browser control there used to be functionality ... scripted thruogh the DOM, so it would require accessing the ...
    (microsoft.public.vb.general.discussion)
  • Re: Date Time Stamp?
    ... Many text editors and other apps have similar functionality. ... I'm too lazy to check TextEdit, which is sort of the default text editor ... on OS X that compares to NotePad. ...
    (comp.sys.mac.system)
  • Re: Date Time Stamp?
    ... You are talking about NotePad, which defines F5 as "insert a datestamp". ... Perhaps one of the many text editors for OS X also have this functionality. ... I'm too lazy to check TextEdit, which is sort of the default text editor on OS X that compares to NotePad. ...
    (comp.sys.mac.system)