Hi
I've written a perl program which, when executed, fork()'s into the
background, doing it's job, so that the ssh session which executed it can be
closed.
The dilemma I have is the program crashes on random occasions due to an
unknown bug which I can't trace. The only method I would have of
dan wrote:
Hi
Hello,
I've written a perl program which, when executed, fork()'s into the
background, doing it's job, so that the ssh session which executed it can be
closed.
The dilemma I have is the program crashes on random occasions due to an
unknown bug which I can't trace.
Maybe it's
-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de zentara
Envoyé : samedi 25 juin 2005 13:36
À : beginners@perl.org
Objet : Re: route STDOUT to file
There are a whole bunch of different ways, ...
Here yet another one ;)
#!/usr/bin/perl
use
John W. Krahn wrote:
dan wrote:
I've written a perl program which, when executed, fork()'s into the
background, doing it's job, so that the ssh session which executed it
can be
closed.
The dilemma I have is the program crashes on random occasions due to an
unknown bug which I can't trace.
I have a script with these three lines and it works
$line =~ s/^\s*//; # Remove leading spaces
next if ($line =~ /^#/);# Skip line if it starts with #
next if ($line =~ /^\s*$/); # Ship blank lines
I can replace lines 1 and 2 above with
next if($line =~ /\s+|#/);
Owen wrote:
I have a script with these three lines and it works
$line =~ s/^\s*//; # Remove leading spaces
You should use \s+ instead of \s* because it is more efficient.
next if ($line =~ /^#/);# Skip line if it starts with #
next if ($line =~ /^\s*$/); # Ship