[16680] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 4092 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Aug 22 11:05:30 2000

Date: Tue, 22 Aug 2000 08:05:14 -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: <966956714-v9-i4092@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Tue, 22 Aug 2000     Volume: 9 Number: 4092

Today's topics:
        #ifdef filtering program ? sibban@my-deja.com
    Re: #ifdef filtering program ? (Marcel Grunauer)
        Callling Java method with Perl <info@digitaltango.com>
    Re: Callling Java method with Perl skesavan@my-deja.com
        cgi newbie help needed <ben.graves@virgin.net>
    Re: cgi newbie help needed (Rafael Garcia-Suarez)
    Re: cgi newbie help needed <ben.graves@virgin.net>
    Re: Comparing the content of two files (Keith Calvert Ivey)
    Re: Direct screen access <gellyfish@gellyfish.com>
    Re: Direct screen access <chris@inta.net.uk>
    Re: Functions and reference notation. (Anno Siegel)
    Re: Hashref infix misunderstood? (Anno Siegel)
    Re: Hashref infix misunderstood? (Keith Calvert Ivey)
        RE: Help <paulino@jccm.es>
    Re: Help <lr@hpl.hp.com>
        Image size ? <NDQ@iris.ltas.ulg.ac.be>
    Re: Image size ? (Rafael Garcia-Suarez)
    Re: Image size ? <NDQ@iris.ltas.ulg.ac.be>
        IO::Select doesn't return the handle for STDIN? <pgunreben@lucent.com>
    Re: Need help of a Perl expert!!! <steve.jones@takethisoutproact.net>
    Re: newline and carriage return problems <lr@hpl.hp.com>
    Re: Opening new processes... <steve.jones@takethisoutproact.net>
    Re: Opening new processes... <steve.jones@takethisoutproact.net>
        procmail, perl and DBD::Oracle orapprb@england.com
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: Tue, 22 Aug 2000 14:22:58 GMT
From: sibban@my-deja.com
Subject: #ifdef filtering program ?
Message-Id: <8nu2bb$foq$1@nnrp1.deja.com>

I was wondering if there exists a filtering program
already to process textfiles with C-style preprocessor
directives (even nested ifdefs) such as:

#ifdef Win
text xxx
#else
text yyy
#endif

 ...

#ifdef UNIX
text zzz
#ifdef LINUX
text aaa
#endif
#endif

 ...

#ifndef Win
text bbb
#endif

TIA


Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Tue, 22 Aug 2000 14:50:01 GMT
From: marcel@codewerk.com (Marcel Grunauer)
Subject: Re: #ifdef filtering program ?
Message-Id: <slrn8q54od.9or.marcel@gandalf.local>

On Tue, 22 Aug 2000 14:22:58 GMT, sibban@my-deja.com <sibban@my-deja.com> wrote:

>I was wondering if there exists a filtering program
>already to process textfiles with C-style preprocessor
>directives (even nested ifdefs) such as:
>
>#ifdef Win
>text xxx
>#else
>text yyy
>#endif


perl has a command-line option for that:

	  -P   run program through C preprocessor before compilation

Or look for source filters. Filter::cpp looks promising.

-- 
Marcel Gr\"unauer - Codewerk plc . . . . . . . . . . . <http://www.codewerk.com>
Perl Consulting, Programming, Training, Code review . . .  <marcel@codewerk.com>
mod_perl, XML solutions - email for consultancy availability
sub AUTOLOAD{($_=$AUTOLOAD)=~s;^.*::;;;y;_; ;;print} Just_Another_Perl_Hacker();


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

Date: Tue, 22 Aug 2000 13:50:34 GMT
From: "Etienne Laverdiere" <info@digitaltango.com>
Subject: Callling Java method with Perl
Message-Id: <Kyvo5.167322$1h3.3068407@news20.bellglobal.com>

Hi all,

can I call a Java Method from a Perl script? I want to import data from a
database to a "private" database;

The reason is that I only have some JAVA API to access this "private
database".
All my data-structure and my (web) interface are already in Perl (CGI by
most) and I would like to use the JAVA API given by the "private database"
to access it (passing perl parameter).

I think this can be very tricky.
Maybe I need a perl-java package to access a Oriented-Objet java API with
some perl.
I am not sure for now.

Is it possible?

 I will continue searching in my books to find a answer.

Thanks for answering.


Etienne Laverdiere
Montreal




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

Date: Tue, 22 Aug 2000 14:31:55 GMT
From: skesavan@my-deja.com
Subject: Re: Callling Java method with Perl
Message-Id: <8nu2sr$gep$1@nnrp1.deja.com>

In article <Kyvo5.167322$1h3.3068407@news20.bellglobal.com>,
  "Etienne Laverdiere" <info@digitaltango.com> wrote:
> Hi all,
>
> can I call a Java Method from a Perl script?


Check out JPL module - I think it comes with Perl 5.6.




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: Tue, 22 Aug 2000 15:23:45 +0100
From: "Ben Graves" <ben.graves@virgin.net>
Subject: cgi newbie help needed
Message-Id: <W1wo5.10799$jK4.149709@news2-win.server.ntlworld.com>

I am trying to teach myself perl script for use in cgi and want to know
weather there is a way to get a perl cgi to load a web page (as in a url)
after executing rather than just sending html code back directly to the
browser.




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

Date: Tue, 22 Aug 2000 14:40:09 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: cgi newbie help needed
Message-Id: <slrn8q54h1.cpq.rgarciasuarez@rafael.kazibao.net>

Ben Graves wrote in comp.lang.perl.misc:
>I am trying to teach myself perl script for use in cgi and want to know
>weather there is a way to get a perl cgi to load a web page (as in a url)
>after executing rather than just sending html code back directly to the
>browser.

You can send a redirection header to the browser; a popular way to do
this is to use the redirect() method of CGI.pm.

-- 
Rafael Garcia-Suarez


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

Date: Tue, 22 Aug 2000 16:04:48 +0100
From: "Ben Graves" <ben.graves@virgin.net>
Subject: Re: cgi newbie help needed
Message-Id: <rEwo5.10895$jK4.150782@news2-win.server.ntlworld.com>

Thanx for your help but could you explain how this is done with a code
example please.

Ben Graves.

"Rafael Garcia-Suarez" <rgarciasuarez@free.fr> wrote in message
news:slrn8q54h1.cpq.rgarciasuarez@rafael.kazibao.net...
> Ben Graves wrote in comp.lang.perl.misc:
> >I am trying to teach myself perl script for use in cgi and want to know
> >weather there is a way to get a perl cgi to load a web page (as in a url)
> >after executing rather than just sending html code back directly to the
> >browser.
>
> You can send a redirection header to the browser; a popular way to do
> this is to use the redirect() method of CGI.pm.
>
> --
> Rafael Garcia-Suarez




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

Date: Tue, 22 Aug 2000 13:48:14 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Comparing the content of two files
Message-Id: <39a983a1.49992780@news.newsguy.com>

"Minh Le" <lem@ocean.com.au> wrote:

>The resulting file has shwon as follows:
>
>+ sdadas  ( + sign indicates this row has been added in B file)
>- fdsfdsd  ( - sign inidcates this row has been deleted in B file)
>! dsdasds ( ! sign indicates this row has been modified in B file)
>
>By using perl, can I extract the result into 3 different files, say,
>mod.txt, del.txt and insert.txt.

Something like this (untested), assuming you've opened the four
files:

    while (<INPUT>) {
        print { /^!/  ? MOD :
                /^-/  ? DEL :
                /^\+/ ? INSERT :
                        STDERR } $_;
    }

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: Tue, 22 Aug 2000 13:39:44 GMT
From: Jonathan Stowe <gellyfish@gellyfish.com>
Subject: Re: Direct screen access
Message-Id: <Aovo5.25$pD2.1189@news.dircon.co.uk>

On Tue, 22 Aug 2000 14:04:45 +0100, Chris Denman Wrote:
> Is it possible to change the video adapter mode to, say, 320X200X256 ?
> 
> I know the screen address is at a000 and is 64K in size (in 256 colour
> mode).
> 
> The reason being, is I would love to write a simple game in Perl (and have
> done so years ago in C).
> 

Unless someone has already done this you will need to create an XS component
to interact with the system at this level.


/J\


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

Date: Tue, 22 Aug 2000 15:07:10 +0100
From: "Chris Denman" <chris@inta.net.uk>
Subject: Re: Direct screen access
Message-Id: <8nu1im$1b22$1@news2.vas-net.net>

Jonathan,

Please excuse my ignorance, could you please tell me what a XS component is?

I have tried to set a variable as an address to hex 0a000 and wrote a
charater to that address, but perl came back with errors, saying that this
area of memory has forbiden access.

Does this mean that even if I could change the screen mode, I will still not
be able to write to this address?

Thanks again.

Chris Denman

Jonathan Stowe wrote in message ...
>On Tue, 22 Aug 2000 14:04:45 +0100, Chris Denman Wrote:
>> Is it possible to change the video adapter mode to, say, 320X200X256 ?
>>
>> I know the screen address is at a000 and is 64K in size (in 256 colour
>> mode).
>>
>> The reason being, is I would love to write a simple game in Perl (and
have
>> done so years ago in C).
>>
>
>Unless someone has already done this you will need to create an XS
component
>to interact with the system at this level.
>
>
>/J\




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

Date: 22 Aug 2000 14:41:52 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Functions and reference notation.
Message-Id: <8nu3fg$1jp$1@lublin.zrz.tu-berlin.de>

 <nobull@mail.com> wrote in comp.lang.perl.misc:
>johnvert@my-deja.com writes:

[...]

>$arrayref->[0] is equivalent to $$arrayref[0]
>
>> %ENV->{SHELL}; instead of the more familiar (to me): $ENV{SHELL};
>>
>> AFAIK, 'ENV' isn't a reference (otherwise why would $ENV{SHELL} work?),
>> so I was hoping someone could explain this syntax (or refer me to the
>> right docs.)
>
>This syntax is permitted by a known bug in the compiler. There have
>been a number of threads about this in this newsgroup and more eurdite
>discussion on the Perl-porters mailing list.
> 
>Do not use this syntax in your scripts as they will fail if and when
>the bug in the compiler is fixed.  In fact enough people are now
>using this syntax that it is more likely that it'll be made a
>mandatory warning rather than a fatal error, at least initially.

That's horrible.  The arrow should be a sure sign that what's to
the left of it is a reference of some kind.  All documented uses
of "->" follow that rule, with the exception that you can call
a class method via Classname->method(), where Classname can be a
bareword or a string. (I never liked that syntax very much either.)

Anno


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

Date: 22 Aug 2000 14:14:15 -0000
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Hashref infix misunderstood?
Message-Id: <8nu1rn$1ic$1@lublin.zrz.tu-berlin.de>

Soren Andersen <soren@spmfoiler.removethat.wonderstorm.com> wrote in comp.lang.perl.misc:
>Why is this printing only one or duplicate of one entries?
>
>I am trying to find file pairs (same name, different extension) in a 
>directory. I'd like to collect the paired names in a hash. When I try 
>to print out the hash, I see that something is wrong. Here's my code, 
>followed by what I get:
>---- code, watch for wrapping ----
>#!perl -w

One point up for "-w", one point down for no "use strict".

>use File::Spec;

One point for striving for portability.

>$dir = $ARGV[0];
>$dir =~ s#\\#/#g;
>print "Now we are opening ",
>   ($dir = File::Spec->rel2abs ($dir)), "\n";
>opendir (GRAF, "$dir") or die "Couldn't open $dir\n$!";
>for (grep /\.gif$/i, (sort readdir GRAF))  {

Uh.  You are probably sorting lots of files that grep is immediately
going to throw away.  Select first, sort later.

This doesn't make a difference in the result, and probably not
a noticeable difference in performance, but swapping sort and
grep costs nothing and is cleaner.

>  $gif = $_;
>#  print ' '. $gif, "\n";
>  s#\.gif$#.png#i or warn "no .gif extension?!";
>  $PNGs->{$gif} = $_ if -e $_ ;

Okay, here is your bug.  You are expecting a file in the directory
$dir, but -e is looking for it in your current directory.  -e will
return false, except by coincidence.  Change your test to
"-e "$dir/$_" so it will look in the right place.

>}
>closedir (GRAF);
>print "Listing of paired GIFs and PNGs: \n";
>for (($d,$f) = each (%$PNGs))  {
> print ' ', $d, '   ', $f, "\n";
>}

You are making the filesystem work harder than you need to.  You
get all the files from readdir(), so it shouldn't be necessary to
ask for the existence of the .png specimen.  After you opendir()
you could continue like this:

my @files = grep m/.(?:gif|png)/, readdir( GRAF); # read what we need

my ( %gifs, %pngs); # One will contain the names that have a .gif extension
                    # (without ".gif"), the other... well you guessed

@gifs{ grep s/\.gif$//, @files} = (); # we only work with keys,
@pngs{ grep s/\.png$//, @files} = (); # values are undefined

# now print what's in both
for ( sort keys %gifs ) {
  print " $_.gif   $_.png\n" if exists $pngs{ $_};
}

__END__

Anno


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

Date: Tue, 22 Aug 2000 13:29:56 GMT
From: kcivey@cpcug.org (Keith Calvert Ivey)
Subject: Re: Hashref infix misunderstood?
Message-Id: <39a88016.49085414@news.newsguy.com>

soren@spmfoiler.removethat.wonderstorm.com (Soren Andersen)
wrote:

>for (($d,$f) = each (%$PNGs))  {
> print ' ', $d, '   ', $f, "\n";
>}
>

You want while(), not for().

-- 
Keith C. Ivey <kcivey@cpcug.org>
Washington, DC


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

Date: Tue, 22 Aug 2000 15:07:31 +0200
From: "Paulino" <paulino@jccm.es>
Subject: RE: Help
Message-Id: <8ntu26$s0o$1@diana.bcn.ttd.net>

Sorry, but I havenīt expleined the problem clearly

I need to change the table where is the program2.gif text by a table with
other tags.

<table>
       ..
  <table>
        ..
    <table>
            ..
      <td>program2.gif</td>
            ..
 </table>
        ..
  </table>
    ..
</table>


If i aply the Regular Expresion
's/<table>.*?program2.gif.*?\/table>/$tablenew/igs' i get it next:

<newtable>
      <td>program3.gif</td>
            ..
 </newtable>
        ..
  </table>
    ..
</table>

and i have lost the first part of the original text.

Regards





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

Date: Tue, 22 Aug 2000 07:07:00 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: Help
Message-Id: <MPG.140c28dd7ccf775998acb8@nntp.hpl.hp.com>

In article <39A2729C.E02749D7@brookes.ac.uk>, qhuo@brookes.ac.uk says...

 ...

> $html =~ m/<table3>(.*?)</table3>/s;
> $1 is what you want.

No it isn't.  You want something that compiles correctly. 

Use a different delimiter for the regex.

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Tue, 22 Aug 2000 16:13:45 +0200
From: NDQ <NDQ@iris.ltas.ulg.ac.be>
Subject: Image size ?
Message-Id: <39A28A99.12D36083@iris.ltas.ulg.ac.be>

Hi,
How to obtain the sizes of image (GIF, JPG, PNG) with Perl ?
Thanks,
-- 
NGUYEN-DAI Quy


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

Date: Tue, 22 Aug 2000 14:36:11 GMT
From: rgarciasuarez@free.fr (Rafael Garcia-Suarez)
Subject: Re: Image size ?
Message-Id: <slrn8q549j.cpq.rgarciasuarez@rafael.kazibao.net>

NDQ wrote in comp.lang.perl.misc:
>Hi,
>How to obtain the sizes of image (GIF, JPG, PNG) with Perl ?

http://search.cpan.org/

Search for Image::Size

-- 
Rafael Garcia-Suarez


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

Date: Tue, 22 Aug 2000 16:54:47 +0200
From: NDQ <NDQ@iris.ltas.ulg.ac.be>
Subject: Re: Image size ?
Message-Id: <39A29437.35D42393@iris.ltas.ulg.ac.be>

Rafael Garcia-Suarez wrote:
> 
> NDQ wrote in comp.lang.perl.misc:
> >Hi,
> >How to obtain the sizes of image (GIF, JPG, PNG) with Perl ?
> 
> http://search.cpan.org/
> 
> Search for Image::Size

Thank you very much !

Q.


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

Date: Tue, 22 Aug 2000 15:03:24 +0200
From: Peter Gunreben <pgunreben@lucent.com>
Subject: IO::Select doesn't return the handle for STDIN?
Message-Id: <39A27A1C.3AFAD7EC@lucent.com>

Hi,

I'm trying to apply the IO::Select for a socket and STDIN.
The IO::Select works fine for sockets, but I couldn't get
it working on STDIN. Two problems were occuring:

1) The $select->can_read didn't wait for activity although
there was no input at STDIN.
2) The handle for STDIN is not returned by can_read even if
there is something to read.

Here's an example:

# ==========================================
use IO::Select;
# Create a new IO::Select object
my $select = new IO::Select(\*STDIN);
while($i++ < 10) # avoid filling the screen
{
   # wait for activity
   @act = $select->can_read;
   # show active filehandle
   print "Active handles: @act\n";
}
# ==========================================

The script does neither wait for acitvity nor
showing the active filehandle. What's wrong?
(I have perl Ver 5.6.0 on WinNT)

Peter


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

Date: Mon, 21 Aug 2000 14:55:03 +0100
From: "Steve Jones" <steve.jones@takethisoutproact.net>
Subject: Re: Need help of a Perl expert!!!
Message-Id: <39a13543_1@nnrp1.news.uk.psi.net>

Don't react to this kind of nonsense. You can help when somebody asks a
naive question. If it doesn't work out, somebody might get upset. That's the
way it goes. Just don't bother next time.

--
Steve Jones

"Uri Guttman" <uri@sysarch.com> wrote in message
news:x7n1i8veel.fsf@home.sysarch.com...
> >>>>> "e" == e411  <e411@altavista.com> writes:
>
>   e> wow I can't believe you would type all that out and not offer to
help,
>   e> just another example of the goofs that provide irrelevant stupid
>   e> garbage responses to questions asked in this group.
>
> and your helpful comments are where? his comments were accurate and
> helpful. you just didn't understand them.
>
>   e> , nobull@mail.com wrote:
>
>   >> http://www.perl.com/CPAN/authors/Dean_Roehrich/subjects.post
>
> a very valid thing to say for a lousy subject. the OP did not need a
> perl expert.
>
>   >> Actually it's fundametally impossible to detect that a IP host is
>   >> offline execpt by trying to communicate with it and timing-out.  Of
>   >> course if you time-out quickly you never know if it's really off line
>   >> or you've just not waited long enough.
>
> accurate and useful.
>
>   >> There is a Perl module available on CPAN (www.cpan.org) that does
>   >> something similar to the ping command.  Guessing the name is left as
>   >> an exercise for the reader.
>
> duh! my brane hurts from that puzzler.
>
>   >> I should point out however that while the module does something
>   >> similar to the "ping" command it is not quite identical and it is
>   >> important to read them manual that comes with it. To see the mess
that
>   >> you get into if you don't read the manual do a Usent search in this
>   >> group on the name of the module.
>
> again accurate and useful. ping.pm is NOT the same as the ping command.
>
> so why are you bitching? because nobull didn't write a free program for
> the OP? or because he didn't sucker him with blather like our resident
> troll?
>
> uri
>
> --
> Uri Guttman  ---------  uri@sysarch.com  ----------
http://www.sysarch.com
> SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX
Consulting
> The Perl Books Page  -----------
http://www.sysarch.com/cgi-bin/perl_books
> The Best Search Engine on the Net  ----------
http://www.northernlight.com




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

Date: Tue, 22 Aug 2000 06:45:50 -0700
From: Larry Rosler <lr@hpl.hp.com>
Subject: Re: newline and carriage return problems
Message-Id: <MPG.140c23e9d7c79cce98acb5@nntp.hpl.hp.com>

[alt.perl removed]

In article <8nt97t$1992$1@nl.novosoft.ru>, skv@iis.nsk.su says...
> Hi!
> 
> > $lf = chr(10);
> > $stuff =~/$lf//g;
> 
> When I want to be sure that there are no
> \r or \n control characters, I'm using following
> substitution:
> 
> $line=~s/\x0d|\x0a//g;

This is much faster:

  $line =~ tr/\x0D\x0A//d;

-- 
(Just Another Larry) Rosler
Hewlett-Packard Laboratories
http://www.hpl.hp.com/personal/Larry_Rosler/
lr@hpl.hp.com


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

Date: Mon, 21 Aug 2000 14:28:28 +0100
From: "Steve Jones" <steve.jones@takethisoutproact.net>
Subject: Re: Opening new processes...
Message-Id: <39a12f09_1@nnrp1.news.uk.psi.net>

There is a module called Proc::background.pm in CPAN for doing this king of
thing, i.e. opening processes in parallel.
--
Steve Jones


"Dave" <superman183@hotmail.com> wrote in message
news:39a02631_3@news1.prserv.net...
> Hi,
>
> I have a perl script which I want to kick off several other processes,
each
> of which will create a file, which in turn the parent script will process
> when all the files have been created. Each child process takes about six
or
> seven seconds to complete, so it's better to kick them off all at once
> rather than wait for each process to complete before kicking off the next
> one....anyway, I don't seem able to get it working the way in which I
want:
>
> I have a script similar to the one below, which is kicked off by another
> process:
>
>      #!/usr/bin/perl
>
>      print "about to make request 1...\n\n";
>      open(FN,"|perl ../123/myshell1.pl > /dev/null 2>&1");
>
>      print "about to make request 2...\n\n";
>      open(FN,"|perl ../123/myshell2.pl > /dev/null 2>&1");
>
>      print "about to make request 3...\n\n";
>      open(FN,"|perl ../123/myshell3.pl > /dev/null 2>&1");
>
>      exits.....
>
>
> but each new process is only kicked off when the previous one has
finished,
> where what I really want is for them all to be kicked off just about at
the
> same time without waiting for the previous one to complete. I'm not
> especially hot on Perl or Unixy things, but I'm sure that it must be
> possible to do this, so hoping very much that someone can assist. Many
> thanks....Dave
>
>
>
>
>
>
>
>
>




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

Date: Mon, 21 Aug 2000 14:28:28 +0100
From: "Steve Jones" <steve.jones@takethisoutproact.net>
Subject: Re: Opening new processes...
Message-Id: <39a1353e_1@nnrp1.news.uk.psi.net>

There is a module called Proc::background.pm in CPAN for doing this king of
thing, i.e. opening processes in parallel.
--
Steve Jones


"Dave" <superman183@hotmail.com> wrote in message
news:39a02631_3@news1.prserv.net...
> Hi,
>
> I have a perl script which I want to kick off several other processes,
each
> of which will create a file, which in turn the parent script will process
> when all the files have been created. Each child process takes about six
or
> seven seconds to complete, so it's better to kick them off all at once
> rather than wait for each process to complete before kicking off the next
> one....anyway, I don't seem able to get it working the way in which I
want:
>
> I have a script similar to the one below, which is kicked off by another
> process:
>
>      #!/usr/bin/perl
>
>      print "about to make request 1...\n\n";
>      open(FN,"|perl ../123/myshell1.pl > /dev/null 2>&1");
>
>      print "about to make request 2...\n\n";
>      open(FN,"|perl ../123/myshell2.pl > /dev/null 2>&1");
>
>      print "about to make request 3...\n\n";
>      open(FN,"|perl ../123/myshell3.pl > /dev/null 2>&1");
>
>      exits.....
>
>
> but each new process is only kicked off when the previous one has
finished,
> where what I really want is for them all to be kicked off just about at
the
> same time without waiting for the previous one to complete. I'm not
> especially hot on Perl or Unixy things, but I'm sure that it must be
> possible to do this, so hoping very much that someone can assist. Many
> thanks....Dave
>
>
>
>
>
>
>
>
>




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

Date: Tue, 22 Aug 2000 13:31:44 GMT
From: orapprb@england.com
Subject: procmail, perl and DBD::Oracle
Message-Id: <8ntvc0$c4t$1@nnrp1.deja.com>

Help!

I'm trying to use procmail together with a simple perl script (perl
5.6.0 installed) to process incoming email, and everything seems fine
until I try to use the DBD::Oracle perl module, at which point the perl
script bombs out with the following error:


DynaLoader.pm loaded (/usr/local/lib/perl5/5.6.0/i586-linux
/usr/local/lib/perl5
/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i586-linux
/usr/local/lib/perl5/site
_perl/5.6.0 /usr/local/lib/perl5/site_perl, /usr/local/lib /lib /usr/lib
/oracle
/product/8.1.5i/lib)
DynaLoader::bootstrap for DBI (:auto:DBI:DBI.so)
DynaLoader::bootstrap for DBD::Oracle (:auto:DBD/Oracle:Oracle.so)
install_driver(Oracle) failed: Can't load
'/usr/local/lib/perl5/site_perl/5.6.0/
i586-linux/auto/DBD/Oracle/Oracle.so' for module DBD::Oracle:
libclntsh.so.8.0:
cannot open shared object file: No such file or directory at
/usr/local/lib/perl
5/5.6.0/i586-linux/DynaLoader.pm line 200, <STDIN> line 13.
 at (eval 1) line 3
Compilation failed in require at (eval 1) line 3, <STDIN> line 13.
Perhaps a required shared library or dll isn't installed where expected
 at /usr/local/bin/mailprocess line 161


This file it's trying to load is world-readable, and the perl runs
correctly when run from the command line as a normal user.

The environment is setup correctly in both the procmailrc file, the perl
script, and the user's .bashrc file


--- begin procmailrc ---

SHELL=/bin/sh
ORACLE_BASE=/oracle
ORACLE_HOME=/oracle/product/8.1.5i
LD_LIBRARY_PATH=/oracle/product/8.1.5i/lib
PATH=$PATH:$ORACLE_HOME/bin


# Process any emails with "test" as the subject
:0
* ^Subject:.*test
|/usr/local/bin/mailprocess


# Bounce all other emails
:0
$?=HANGUP

--- end procmailrc ---




Sent via Deja.com http://www.deja.com/
Before you buy.


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 4092
**************************************


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