Re: file locks and a counter
- From: Richard Nixon <richard@xxxxxxxxxxxxxxx>
- Date: Tue, 30 Sep 2008 13:22:56 -0600
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
.
- References:
- file locks and a counter
- From: Richard Nixon
- Re: file locks and a counter
- From: xhoster
- Re: file locks and a counter
- From: Richard Nixon
- Re: file locks and a counter
- From: Jürgen Exner
- file locks and a counter
- Prev by Date: FAQ 2.8 Where can I get information on Perl?
- Next by Date: Re: file locks and a counter
- Previous by thread: Re: file locks and a counter
- Next by thread: Re: file locks and a counter
- Index(es):
Relevant Pages
|