[18655] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 823 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 2 18:06:50 2001

Date: Wed, 2 May 2001 15:05:10 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <988841110-v10-i823@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Wed, 2 May 2001     Volume: 10 Number: 823

Today's topics:
        Algorithm ? <dkoleary@ro05-24-29-232-217.ce.mediaone.net>
    Re: Algorithm ? (Abigail)
    Re: Algorithm ? (Logan Shaw)
    Re: Another regexp question <keesh@users.pleaseremovethisbit.sourceforge.net>
    Re: Another regexp question <keesh@users.pleaseremovethisbit.sourceforge.net>
    Re: Another regexp question (Rudolf Polzer)
        Color <kdalal@students.uiuc.edu>
    Re: Color <tony_curtis32@yahoo.com>
    Re: Color <hillr@ugs.com>
    Re: Comparison of Time <goldbb2@earthlink.net>
    Re: Concatenating mpegs <Jonathan.L.Ericson@jpl.nasa.gov>
    Re: Corrupted scripts Winows to UNIX (nospam)
        DB_File make test failed duverm@hotmail.com 
        DB_File make test failed duverm@hotmail.com 
    Re: Does 'exec' never fail? (Anno Siegel)
    Re: Good editor for perl <rcranberry@hotmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Wed, 02 May 2001 19:36:57 GMT
From: Doug O'Leary <dkoleary@ro05-24-29-232-217.ce.mediaone.net>
Subject: Algorithm ?
Message-Id: <tlZH6.72$qPc.4587693@news.randori.com>

Hey, all;

I know there's a clever way to do what I need to do; I'm just not
clever enough to figure it out on my own...

I have a file containing 600+ entries on which I need to do the 
same process.  Running through the entire file sequentially takes too 
long, so I want to parallelize the processing to a degree that's 
user specified (either on cmd line or as variable - that part's moot).

I know I'm going to have to fork/exec processes.  Although I'm not 
*real* comfortable with the syntax, I've done it and can figure it
out again.  

The part I'm having a problem with is how to limit the processing.  If
the  outer loop is reading the file, I have 600+ children which is a 
tad ... excessive.  

If I loop through the index, then how do I know when I can kick off
another child?  For instance:

while (<In>)
{	for ( $index = 0; $index < $degree; $index++)
	{	next if $pid = fork;
		die "fork: ($!)" if ! defined $pid;
		### child processing
	}
}

How do I stop the thing from looping until at least one of the 
child processes has died?

Along those same lines, how do I keep the other children looping if 
one of those puppies hangs for awhile?

Any hints/tips would be greatly appreciated.

Thanks for your time.

Doug

-- 
------------------------
Douglas K. O'Leary
Senior System Administrator
dkoleary@mediaone.net


------------------------------

Date: Wed, 2 May 2001 20:29:43 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: Algorithm ?
Message-Id: <slrn9f0rhm.9ss.abigail@tsathoggua.rlyeh.net>

Doug O'Leary (dkoleary@ro05-24-29-232-217.ce.mediaone.net) wrote on
MMDCCCI September MCMXCIII in <URL:news:tlZH6.72$qPc.4587693@news.randori.com>:
,,  Hey, all;
,,  
,,  I know there's a clever way to do what I need to do; I'm just not
,,  clever enough to figure it out on my own...
,,  
,,  I have a file containing 600+ entries on which I need to do the 
,,  same process.  Running through the entire file sequentially takes too 
,,  long, so I want to parallelize the processing to a degree that's 
,,  user specified (either on cmd line or as variable - that part's moot).
,,  
,,  I know I'm going to have to fork/exec processes.  Although I'm not 
,,  *real* comfortable with the syntax, I've done it and can figure it
,,  out again.  
,,  
,,  The part I'm having a problem with is how to limit the processing.  If
,,  the  outer loop is reading the file, I have 600+ children which is a 
,,  tad ... excessive.  


Why? No good OS should have a problem with 600 processes. Of course, if
they are all CPU bound it could be a problem, but then, you shouldn't
fork in the first place.

,,  If I loop through the index, then how do I know when I can kick off
,,  another child?  For instance:
,,  
,,  while (<In>)
,,  {	for ( $index = 0; $index < $degree; $index++)
,,  	{	next if $pid = fork;
,,  		die "fork: ($!)" if ! defined $pid;
,,  		### child processing
,,  	}
,,  }
,,  
,,  How do I stop the thing from looping until at least one of the 
,,  child processes has died?

Eeew, now your children are forking too! You want the child to exit
when it's done, it should not return to the loop.

To keep the number of children under a certain limit, start up the
number of children you want to have running, and then start waiting
for childs to finish. When a child finishes, fork() off a new one
as long as you need to process more lines.

,,  Along those same lines, how do I keep the other children looping if 
,,  one of those puppies hangs for awhile?

Use alarm() and set a timeout.

,,  Any hints/tips would be greatly appreciated.

Did you study the perlipc manpage? Did you study Advanced Programming
in the Unix Environment?



Abigail


------------------------------

Date: 2 May 2001 15:43:42 -0500
From: logan@cs.utexas.edu (Logan Shaw)
Subject: Re: Algorithm ?
Message-Id: <9cprhu$hcv$1@boomer.cs.utexas.edu>

In article <tlZH6.72$qPc.4587693@news.randori.com>,
Doug O'Leary  <dkoleary@ro05-24-29-232-217.ce.mediaone.net> wrote:
>I know there's a clever way to do what I need to do; I'm just not
>clever enough to figure it out on my own...
>
>I have a file containing 600+ entries on which I need to do the 
>same process.  Running through the entire file sequentially takes too 
>long, so I want to parallelize the processing to a degree that's 
>user specified (either on cmd line or as variable - that part's moot).
>
>I know I'm going to have to fork/exec processes.  Although I'm not 
>*real* comfortable with the syntax, I've done it and can figure it
>out again.  
>
>The part I'm having a problem with is how to limit the processing.  If
>the  outer loop is reading the file, I have 600+ children which is a 
>tad ... excessive.  

What I usually do in this situation is to pick a fixed number of child
processes I want, say 10 (make it a command line option).

Then, I have a count of forked processes.  Whenever I succeed in
forking one, I increase the count.  Also, whenever I call wait() and
find out that a child process has finished, I decrease the count.

My main loop ends up looking something like this (untested code):

    $max = 10;
    $running = 0;
    @tasks_left = # a list of scalars that each represent a task

    while (@tasks_left > 0 or $running > 0)
    {
	# start jobs until we hit the maximum
	while ($running < $max and @tasks_left > 0)
	{
	    $running++ if fork_a_new_job ( \@tasks_left );
	}

	# wait for jobs unless we have no more to wait for
	if ($running > 0)
	{
	    $running-- unless (-1 != $pid = wait());
	}
    }

Notice that the stuff at the end of the loop is an "if" and not a
while.  This ensures that you don't end up waiting on *all* your tasks
to finish before you try to start additional ones.

Another thing you can do (but don't need to) is keep a hash based on
pid (fork() will tell you the pid) of what task is assigned to what
child.  That way, you can keep track of which tasks are finished
by getting the pid back from wait() and looking it up in the hash.

For better performance (if your tasks are small), group them together
so that each child handles a number of them, like 5 or 10.  That way,
you cut the number of required calls to fork().  (Another trick is to
group the tasks into smaller clumps if you only have a few left.)

Hope that helps.

  - Logan
-- 
my  your   his  her   our   their   _its_
I'm you're he's she's we're they're _it's_


------------------------------

Date: Wed, 02 May 2001 18:49:23 +0100
From: "Ciaran McCreesh" <keesh@users.pleaseremovethisbit.sourceforge.net>
Subject: Re: Another regexp question
Message-Id: <9cph7p$4of$1@news5.svr.pol.co.uk>

In article <slrn9eu1jv.jeb.tadmc@tadmc26.august.net>, "Tad McClellan"
<tadmc@augustmail.com> wrote:
>>s/(regex)p/\1/gi;
> 
> You should enable warnings.

Oops, I was thinking in another language there... Sorry...

[hides head in shame]

-- 
Ciaran McCreesh
mail:    keesh@users.sourceforge.net
web:     http://www.opensourcepan.com/


------------------------------

Date: Wed, 02 May 2001 18:50:36 +0100
From: "Ciaran McCreesh" <keesh@users.pleaseremovethisbit.sourceforge.net>
Subject: Re: Another regexp question
Message-Id: <9cpha1$4ff$1@newsg4.svr.pol.co.uk>

In article <teub724pe84ha4@corp.supernews.com>, "Craig Berry"
<cberry@cinenet.net> wrote:
> : I'm seriously tempted to modify my newsreader to : s/(regex)p/\1/gi;
> everything to make it easier to read...
> 
> Use $1 instead of \1, and you won't get warnings when you do it. :)

Ah, too many languages, all of which are too different...

Doh.

-- 
Ciaran McCreesh
mail:    keesh@users.sourceforge.net
web:     http://www.opensourcepan.com/


------------------------------

Date: Wed, 2 May 2001 21:48:21 +0200
From: eins@durchnull.de (Rudolf Polzer)
Subject: Re: Another regexp question
Message-Id: <slrn9f0p44.p7h.eins@www42.t-offline.de>

Greg Bacon <gbacon@HiWAAY.net> wrote:
> In article <pchuet8l1ogkedh8m9apulnffirp5qbfob@4ax.com>,
>     Bart Lateur  <bart.lateur@skynet.be> wrote:
> 
> : Rudolf Polzer wrote:
> : 
> : >Of course. But this is not an error.
> : 
> : It is, or it should be. \1 has a meaning outside regexes: it's a
> : reference to the scalar 1.
> 
> Oh yeah, I forgot that perl doesn't do any disambiguation.

It does. It warns because it is maybe not DWIM what perl does.

-- 
#!/usr/bin/perl -- Random sig generator. Editor command in slrn => ~/siggs
$F=shift;open H,"+<$F";$_=join"",<H>;$s=index$_,"\n\n-- \n";$s<0||truncate
H,$s;close H;system"$ENV{EDITOR} $F</dev/tty>/dev/tty";$s=$n=0;for#sichtig
(<~/siggs/*>){++$n;int rand$n or$s=$_};`(echo "\n\n-- ")|cat - $s>>$F`+nan


------------------------------

Date: Wed, 2 May 2001 13:51:04 -0500
From: karan shishir dalal <kdalal@students.uiuc.edu>
Subject: Color
Message-Id: <Pine.GSO.4.31.0105021348250.13964-100000@ux7.cso.uiuc.edu>

Wassup..

Just need some help on how i could include colors to my output in my
script.Im just starting out in writing scripts and have just written
ascript which tells me when my friends are online and i just wanted to
view the output in a different color than the noraml black and white !
Any help would be greatly appreciated !
Thanks guys !
Karan


-----  BEGIN GEEK CODE BLOCK  -----
Version 3.1
GCS/CM d-(?) s: a--->? C+++(++) U>++
L+>++++ W++ n+++(+) o? K? w++>$ O--- M--
V! PS+ PE++ Y? PGP-- t- 5? X R*@ tv--()
b+(+++) DI D---- G e>+++++>$ !r> y--*
------  END GEEK CODE BLOCK  ------





------------------------------

Date: 02 May 2001 13:53:09 -0500
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Color
Message-Id: <87d79rwpka.fsf@limey.hpcc.uh.edu>

>> On Wed, 2 May 2001 13:51:04 -0500,
>> karan shishir dalal <kdalal@students.uiuc.edu> said:

> Wassup..  Just need some help on how i could include
> colors to my output in my script.Im just starting out in
> writing scripts and have just written ascript which
> tells me when my friends are online and i just wanted to
> view the output in a different color than the noraml
> black and white !

Term::ANSIColor

available on CPAN.

hth
t
-- 
Just reach into these holes.  I use a carrot.


------------------------------

Date: Wed, 02 May 2001 11:56:44 -0700
From: Ron Hill <hillr@ugs.com>
Subject: Re: Color
Message-Id: <3AF0586C.1AF44D53@ugs.com>

karan shishir dalal wrote:

> Just need some help on how i could include colors to my output in my
> script.
[snipped]

For windows NT
you need to use Win32::Console

For unix 
use Term::ANSIColor

I hope this helps

Ron Hill


------------------------------

Date: Wed, 02 May 2001 18:51:45 GMT
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Comparison of Time
Message-Id: <3AF05881.F3668336@earthlink.net>

Steffen Beyer wrote:
[snip]
> Instead of the string "daytime", you probably need the corresponding
> port address, don't you?

It depends on if IO::Socket::INET->new is willing to do a lookup in
/etc/services

When I worked with unix, I often did stuff using things like "telnet
newshost nntp" or "telnet mailhost smtp" and didn't worry about the real
value of the port number.

-- 
Shift to the left, shift to the right, mask in, mask out, BYTE, BYTE,
BYTE !!!


------------------------------

Date: 02 May 2001 18:08:16 +0000
From: Jon Ericson <Jonathan.L.Ericson@jpl.nasa.gov>
Subject: Re: Concatenating mpegs
Message-Id: <86bspbmxnz.fsf@jon_ericson.jpl.nasa.gov>

"Brad Morrison" <Brad.Morrison@mincom.com> writes:

> I have tried opening each mpeg in succession (in binmode), looping over the
> contents, and printing (also using binmode on my output filehandle) each
> line to the one mpeg file. However, while the resulting movie is the
> correct size only the first movie plays. Presumably, there is some movie
> length control data that defines the size of the movie.
> 
> A search on CPAN did not reveal anything useful.
> 
> So, is this possible without delving too deeply into the mpeg file spec?

You might search for mpeg FAQs and forums.  This is not strictly a
perl issue.

Jon


------------------------------

Date: Wed, 02 May 2001 20:04:49 GMT
From: "Nigel Taylor" <niget(nospam)@sympatico.ca>
Subject: Re: Corrupted scripts Winows to UNIX
Message-Id: <BLZH6.383$_f3.7030@news20.bellglobal.com>

Thanks guy's

I know this is not a language question in general, but I
appreciate the answers.

Nigel




------------------------------

Date: Wed, 02 May 2001 18:56:12 GMT
From: duverm@hotmail.com 
Subject: DB_File make test failed
Message-Id: <gLYH6.7300$SZ5.590944@www.newsranger.com>

Could somebody please help me??  I've downloaded and installed DB_File v1.77.
My Perl version is 5.6.0.  I am running on HPUX 11.  The install went fine, but
the test bombs (see below.)  I don't even know where to go from here.   

I am running BerkelyDB v2.77.

Any helpful hints would be appreciated.

Thanks!

-Mark

 ..
$ make test
PERL_DL_NONLAZY=1 /opt/perl5/bin/perl -Iblib/arch -Iblib/lib -I/opt/perl
5/lib/5.6.0/PA-RISC1.1 -I/opt/perl5/lib/5.6.0 -e 'use Test::Harness qw(&runtests
$verbose); $verbose=0; runtests @ARGV;' t/*.t
t/db-btree..........Can't call method "DELETE" on an undefined value at t/db-btr
ee.t line 226.
t/db-btree..........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 26-157
Failed 132/157 tests, 15.92% okay
t/db-hash...........Can't call method "DELETE" on an undefined value at t/db-has
h.t line 193.
t/db-hash...........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 22-111
Failed 90/111 tests, 18.92% okay
t/db-recno..........ok
Failed Test  Status Wstat Total Fail  Failed  List of failed
-------------------------------------------------------------------------------
t/db-btree.t    255 65280   157  132  84.08%  26-157
t/db-hash.t     255 65280   111   90  81.08%  22-111
Failed 2/3 test scripts, 33.33% okay. 222/417 subtests failed, 46.76% okay.
*** Error exit code 2

Stop.
$
 ..




------------------------------

Date: Wed, 02 May 2001 19:00:28 GMT
From: duverm@hotmail.com 
Subject: DB_File make test failed
Message-Id: <gPYH6.7307$SZ5.591585@www.newsranger.com>

Could somebody please help me??  I've downloaded and installed DB_File v1.77.
My Perl version is 5.6.0.  I am running on HPUX 11.  The install went fine, but
the test bombs (see below.)  I don't even know where to go from here.   

I am running BerkelyDB v3.2.9.

Any helpful hints would be appreciated.

Thanks!

-Mark

 ..
$ make test
PERL_DL_NONLAZY=1 /opt/perl5/bin/perl -Iblib/arch -Iblib/lib -I/opt/perl
5/lib/5.6.0/PA-RISC1.1 -I/opt/perl5/lib/5.6.0 -e 'use Test::Harness qw(&runtests
$verbose); $verbose=0; runtests @ARGV;' t/*.t
t/db-btree........../usr/lib/dld.sl: Unresolved symbol: pthread_cond_wait (code)
from blib/arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_trylock (code)  from blib/arch
/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_condattr_destroy (code)  from blib/a
rch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutexattr_destroy (code)  from blib/
arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_cond_init (code)  from blib/arch/aut
o/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_init (code)  from blib/arch/au
to/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_destroy (code)  from blib/arch
/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_condattr_init (code)  from blib/arch
/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_unlock (code)  from blib/arch/
auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_cond_signal (code)  from blib/arch/a
uto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_condattr_setpshared (code)  from bli
b/arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutexattr_init (code)  from blib/arc
h/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutexattr_setpshared (code)  from bl
ib/arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_lock (code)  from blib/arch/au
to/DB_File/DB_File.sl
Can't load 'blib/arch/auto/DB_File/DB_File.sl' for module DB_File: Unresolved ex
ternal at /opt/perl5/lib/5.6.0/PA-RISC1.1/DynaLoader.pm line 200.
at t/db-btree.t line 24
Compilation failed in require at t/db-btree.t line 24.
BEGIN failed--compilation aborted at t/db-btree.t line 24.
t/db-btree..........dubious
Test returned status 255 (wstat 65280, 0xff00)
t/db-hash.........../usr/lib/dld.sl: Unresolved symbol: pthread_cond_wait (code)
from blib/arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_trylock (code)  from blib/arch
/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_condattr_destroy (code)  from blib/a
rch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutexattr_destroy (code)  from blib/
arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_cond_init (code)  from blib/arch/aut
o/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_init (code)  from blib/arch/au
to/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_destroy (code)  from blib/arch
/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_condattr_init (code)  from blib/arch
/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_unlock (code)  from blib/arch/
auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_cond_signal (code)  from blib/arch/a
uto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_condattr_setpshared (code)  from bli
b/arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutexattr_init (code)  from blib/arc
h/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutexattr_setpshared (code)  from bl
ib/arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_lock (code)  from blib/arch/au
to/DB_File/DB_File.sl
Can't load 'blib/arch/auto/DB_File/DB_File.sl' for module DB_File: Unresolved ex
ternal at /opt/perl5/lib/5.6.0/PA-RISC1.1/DynaLoader.pm line 200.
at t/db-hash.t line 24
Compilation failed in require at t/db-hash.t line 24.
BEGIN failed--compilation aborted at t/db-hash.t line 24.
t/db-hash...........dubious
Test returned status 255 (wstat 65280, 0xff00)
t/db-recno........../usr/lib/dld.sl: Unresolved symbol: pthread_cond_wait (code)
from blib/arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_trylock (code)  from blib/arch
/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_condattr_destroy (code)  from blib/a
rch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutexattr_destroy (code)  from blib/
arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_cond_init (code)  from blib/arch/aut
o/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_init (code)  from blib/arch/au
to/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_destroy (code)  from blib/arch
/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_condattr_init (code)  from blib/arch
/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_unlock (code)  from blib/arch/
auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_cond_signal (code)  from blib/arch/a
uto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_condattr_setpshared (code)  from bli
b/arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutexattr_init (code)  from blib/arc
h/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutexattr_setpshared (code)  from bl
ib/arch/auto/DB_File/DB_File.sl
/usr/lib/dld.sl: Unresolved symbol: pthread_mutex_lock (code)  from blib/arch/au
to/DB_File/DB_File.sl
Can't load 'blib/arch/auto/DB_File/DB_File.sl' for module DB_File: Unresolved ex
ternal at /opt/perl5/lib/5.6.0/PA-RISC1.1/DynaLoader.pm line 200.
at t/db-recno.t line 24
Compilation failed in require at t/db-recno.t line 24.
BEGIN failed--compilation aborted at t/db-recno.t line 24.
t/db-recno..........dubious
Test returned status 255 (wstat 65280, 0xff00)
FAILED--3 test scripts could be run, alas--no output ever seen
*** Error exit code 2

Stop.
$
 ..




------------------------------

Date: 2 May 2001 20:02:36 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Does 'exec' never fail?
Message-Id: <9cpp4s$jnr$1@mamenchi.zrz.TU-Berlin.DE>

According to Bernie Cosell  <bernie@fantasyfarm.com>:
> eins@durchnull.de (Rudolf Polzer) wrote:

[about Perl's warning if code follows an exec()]
 
> } ... This is a 'feature' that should warn you when you
> } use exec() instead of system().
> 
> What's bizarre is that it can *NEVER* be a 'feature' -- it is, IMO, very
> bad programming practice not to check for errors [don't folk HARP on that
> around here all the time].  Plain and simple, exec can/does fail and perl
> basically encourages you to program poorly/dangerously [as I mentioned: ala
> the 'forgetting to put an exit in the child fork branch' -- if, say, your
> PATH is wrong and you can't find the program to exec, instead of dealing
> with it gracefully, your program will just run onto what random code came
> next in the source... that *can't* be a good programming practice to
> virtually force on folk.

Not so.  The standard error checking routines in Perl work for
exec() just like for other system calls:

  exec() or die;
  die unless exec();

 ...or even

  unless ( exec() ) {
      die;
  }

Only when you insist in using exec()s feature that it doesn't return
upon success and catch the error in an unconditional statement does
Perl complain.  If there is bad programming practice to be detected,
it may be the use of this peculiarity.  Perl's authors don't seem
to think it's bad practice:  "die", "warn" or "exit" are exempt from
the warning in newer Perls.

Anno


------------------------------

Date: Wed, 2 May 2001 14:36:32 -0500
From: "Ralph Cranberry" <rcranberry@hotmail.com>
Subject: Re: Good editor for perl
Message-Id: <9cpnd202p78@enews3.newsguy.com>

www.editplus.com

Excellent editor!

"Super-Simon" <simon@super-simon.com> wrote in message
news:9c1csm$loh$1@news1.xs4all.nl...
> Hi all,
>
> I'm searching for a good, fast editor with syntax highlighting for perl
> (CGI) for use under Windows 2000 / Windows 98 (I use windowz only for
> editing scripts, scripts runs on Linux-server). It has to be free (I'm a
> poor student ;-)
>
> Grtz,
>
> Super-Simon
>
>




------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

For other requests pertaining to the digest, send mail to
perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
sending perl questions to the -request address, I don't have time to
answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 823
**************************************


home help back first fref pref prev next nref lref last post