RE: installing DBI on HPUX

2004-05-10 Thread NYIMI Jose (BMB)
> -Original Message-
> From: Christian Stalp [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 10, 2004 2:51 PM
> To: NYIMI Jose (BMB)
> Cc: [EMAIL PROTECTED]
> Subject: Re: installing DBI on HPUX
> 
> 
> 
> 
> 
> > You either need the HP ANSI C compiler or GCC. Since you 
> seem to use a 
> > perl which was build using the HP ANSI C compiler it's easiest to 
> > install that compiler on the system you're trying to get 
> DBI to work. 
> > However, you need to PAY for that compiler so you might 
> want to switch 
> > to GCC. I'm not entirely sure if you would need to recompile perl 
> > itself with GCC for that to work. (would be best no doubt)
> 
> Hello, I allready installed gcc but the Makefile calls the 
> HPUX-cc compiler. 
> (CC = cc )
> How can I tell the system to use the gcc instead of the cc?

If your perl has been compiled with cc, it will always generates the Makefile with 
CC=cc.
I'm afraid you will need to re-compile your perl with gcc.
Anyway, you can try to edit the Makefile and change CC=cc to CC=gcc
But I don't think this will work.

HTH,

José.


 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




re: Opening with a pipe

2004-05-10 Thread William Black
Hello I have the following driver script that calls two perl scripts to run 
them asyn.  The driver calls the open command for both scripts but the pgm 
just hangs and never finishes.  Does anyone know why?

Driver:
open (DAL,"C:\temp7\backup\temp1.pl");
open (DAL,"C:\temp7\backup\temp2.pl");
while (!-e "C:\temp7\backup\temp2.done"){}
while (!-e "C:\temp7\backup\temp1.done"){}
close(DAL);
close(STL);
temp1.pl
$i=0;
while ($i<500){$i += 1;}
system(echo complete > C:\temp7\backup\temp1.done);


temp2.pl
$i=0;
while ($i<500){$i += 1;}
system(echo complete > C:\temp7\backup\temp2.done);
William Black

_
Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage! 
http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



re: Piped input

2004-05-10 Thread William Black

Hello I have the following driver script that calls two perl scripts to run 
them asyn.  The driver calls the open command for both scripts but the pgm 
just hangs and never finishes.  Does anyone know why?

Driver:
open (DAL,"|C:\temp7\backup\temp1.pl");
open (DAL,"|C:\temp7\backup\temp2.pl");
while (!-e "C:\temp7\backup\temp2.done"){}
while (!-e "C:\temp7\backup\temp1.done"){}
close(DAL);
close(STL);
temp1.pl
$i=0;
while ($i<500){$i += 1;}
system(echo complete > C:\temp7\backup\temp1.done);


temp2.pl
$i=0;
while ($i<500){$i += 1;}
system(echo complete > C:\temp7\backup\temp2.done);
William Black
William Black

_
Check out the coupons and bargains on MSN Offers! http://youroffers.msn.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



RE: Piped input

2004-05-10 Thread NandKishore.Sagi
The file handlers are both DAL. 

Change the file handler names.

-Original Message-
From: William Black [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 10, 2004 8:50 AM
To: [EMAIL PROTECTED]
Subject: re: Piped input



>Hello I have the following driver script that calls two perl scripts to

>run
>them asyn.  The driver calls the open command for both scripts but the
pgm 
>just hangs and never finishes.  Does anyone know why?
>
>Driver:
>open (DAL,"|C:\temp7\backup\temp1.pl");
>open (DAL,"|C:\temp7\backup\temp2.pl");
>
>while (!-e "C:\temp7\backup\temp2.done"){}
>while (!-e "C:\temp7\backup\temp1.done"){}
>
>close(DAL);
>close(STL);
>
>
>temp1.pl
>$i=0;
>while ($i<500){$i += 1;}
>system(echo complete > C:\temp7\backup\temp1.done);
>
>
>
>temp2.pl
>$i=0;
>while ($i<500){$i += 1;}
>system(echo complete > C:\temp7\backup\temp2.done);
>
>William Black

William Black

_
Check out the coupons and bargains on MSN Offers!
http://youroffers.msn.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: File Monitoring

2004-05-10 Thread JupiterHost.Net


PerlDiscuss - Perl Newsgroups and mailing lists wrote:

Hi there,
Hello,

Can anyone recommend a good way to have a perl script that constantly
monitors for the creation of new files on UNIX and launches another
process?
Not sure if someone else recommended this but:

[untested code - for example only]
 #!/usr/bin/perl
 use strict;
 use warnings;
 while(1) {
   opendir DIRH, '/foo/bar' or die $!;
   my @curlst = ;
   closedir(DIRH);
   if(grep /watch for me/, @curlst) {
   # launch other process here...
   }
   sleep(15);
 }
Then start it running like so:
./thisscript.pl &
Thanks!
np, HTH

Lee.M - JupiterHost.Net

Cheers,
Ben

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: installing DBI on HPUX

2004-05-10 Thread Peter Scott
In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] (Christian Stalp) writes:

>Hello, I allready installed gcc but the Makefile calls the HPUX-cc compiler. 
>(CC = cc )
>How can I tell the system to use the gcc instead of the cc?

perl Makefile.PL CC=/usr/local/bin/gcc

-- 
Peter Scott
http://www.perldebugged.com/
*** NEW *** http://www.perlmedic.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: File Monitoring

2004-05-10 Thread Wiggins d Anconia
> Hi there,
> 
> Can anyone recommend a good way to have a perl script that constantly
> monitors for the creation of new files on UNIX and launches another
> process?
> 
> Thanks!
> 
> Cheers,
> Ben
> 

Lee's method would be the sufficient underkill way. I have an
application that does this type of thing that was written using POE,
which made it trivial, but may make it overkill. For us we needed the
extensibility and scalability that POE offered so it wasn't overkill.

There is a directory watching component in POE or you could grow your
own, sorry I can't provide the one I have (licensing issues). 
POE::Wheel::Run is ideal for managing external processes called from
within the app.

http://poe.perl.org

Has more, be warned there is a learning curve here...

http://danconia.org


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: File Monitoring

2004-05-10 Thread Dani Pardo
   Hi, I've done this app. What I do is put into a file the output of 
ls -lR /directory_to_watch.
 Then use diff to compare the results. This gives the advantage that, 
if a line starts with +, then a new file has been added. If it's -,  a 
file has been deleted :)

$ ls -lR > listing1.txt
$ ls -lR > listing2.txt
$ diff listing1.txt listing2.txt > diff.txt

Of course, this works on a Un*x environment.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



RE: installing DBI on HPUX

2004-05-10 Thread NYIMI Jose (BMB)
> -Original Message-
> From: Peter Scott [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 10, 2004 3:31 PM
> To: [EMAIL PROTECTED]
> Subject: Re: installing DBI on HPUX
> 
> 
> In article <[EMAIL PROTECTED]>,
>  [EMAIL PROTECTED] (Christian Stalp) writes:
> 
> >Hello, I allready installed gcc but the Makefile calls the HPUX-cc 
> >compiler.
> >(CC = cc )
> >How can I tell the system to use the gcc instead of the cc?
> 
> perl Makefile.PL CC=/usr/local/bin/gcc

This seems to be a better way to go.
But I'm still wondering if he don't have to re-compile its perl with gcc ?

José.



 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: File Monitoring

2004-05-10 Thread NYIMI Jose (BMB)
> -Original Message-
> From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 10, 2004 4:36 PM
> To: PerlDiscuss - Perl Newsgroups and mailing lists; 
> [EMAIL PROTECTED]
> Subject: Re: File Monitoring

[snip]

> There is a directory watching component in POE 

Where to find doc on that (link) ?

>or you could grow your own, sorry
>I can't provide the one I have (licensing issues).

Why did you re-invented the wheel ;)
Or Am I missing some basic infos ?

Thanks,

José.


 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




perl.beginners Weekly list FAQ posting

2004-05-10 Thread casey
NAME
beginners-faq - FAQ for the beginners mailing list

1 -  Administriva
  1.1 - I'm not subscribed - how do I subscribe?
Send mail to <[EMAIL PROTECTED]>

You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address):

<[EMAIL PROTECTED]>.

  1.2 -  How do I unsubscribe?
Now, why would you want to do that? Send mail to
<[EMAIL PROTECTED]>, and wait for a response. Once you
reply to the response, you'll be unsubscribed. If that doesn't work,
find the email address which you are subscribed from and send an email
like the following (let's assume your email is [EMAIL PROTECTED]):

<[EMAIL PROTECTED]>

  1.3 - There is too much traffic on this list. Is there a digest?
Yes. To subscribe to the digest version of this list send an email to:

<[EMAIL PROTECTED]>

To unsubscribe from the digest, send an email to:

<[EMAIL PROTECTED]>

This is a high traffic list (100+ messages per day), so please subscribe
in the way which is best for you.

  1.4 - Is there an archive on the web?
Yes, there is. It is located at:

http://archive.develooper.com/beginners%40perl.org/

  1.5 - How can I get this FAQ?
This document will be emailed to the list once a week, and will be
available online in the archives, and at http://learn.perl.org/

  1.6 - I don't see something in the FAQ, how can I make a suggestion?
Send an email to <[EMAIL PROTECTED]> with your suggestion.

  1.7 - Is there a supporting website for this list?
Yes, there is. It is located at:

http://beginners.perl.org/

  1.8 - Who do I complain to?
You can send complaints to <[EMAIL PROTECTED]>

  1.9 - Who currently maintains the FAQ?
Kevin Meltzer, who can be reached at the email address (for FAQ
suggestions only) in question 1.6

  1.10 - Who will maintain peace and flow on the list?
Casey West, Kevin Meltzer and Ask Bjoern Hansen currently carry large,
yet padded, clue-sticks to maintain peace and order on the list. If you
are privately emailed by one of these folks for flaming, being
off-topic, etc... please listen to what they say. If you see a message
sent to the list by one of these people saying that a thread is closed,
do not continue to post to the list on that thread! If you do, you will
not only meet face to face with a XQJ-37 nuclear powered pansexual
roto-plooker, but you may also be taken off of the list. These people
simply want to make sure the list stays topical, and above-all, useful
to Perl beginners.

  1.11 - When was this FAQ last updated?
Feb 04, 2004

2 -  Questions about the 'beginners' list.
  2.1 - What is the list for?
A list for beginning Perl programmers to ask questions in a friendly
atmosphere.

  2.2 - What is this list _not_ for?
* SPAM
* Homework
* Solicitation
* Things that aren't Perl related
* Monkeys
* Monkeys solicitating homework on non-Perl related SPAM.

  2.3 - Are there any rules?
Yes. As with most communities, there are rules. Not many, and ones that
shouldn't need to be mentioned, but they are.

* Be nice
* No flaming
* Have fun

  2.4 - What topics are allowed on this list?
Basically, if it has to do with Perl, then it is allowed. You can ask
CGI, networking, syntax, style, etc... types of questions. If your
question has nothing at all to do with Perl, it will likely be ignored.
If it has anything to do with Perl, it will likely be answered.

  2.5 - I want to help, what should I do?
Subscribe to the list! If you see a question which you can give an
idiomatic and Good answer to, answer away! If you do not know the
answer, wait for someone to answer, and learn a little.

  2.6 - Is there anything I should keep in mind while answering?
We don't want to see 'RTFM'. That isn't very helpful. Instead, guide the
beginner to the place in the FM they should R :)

Please do not quote the documentation unless you have something to add
to it. It is better to direct someone to the documentation so they
hopefully will read documentation above and beyond that which answers
their question. It also helps teach them how to use the documentation.

  2.7 - I don't want to post a question if it is in an FAQ. Where should I
look first?
Look in the FAQ! Get acquainted with the 'perldoc' utility, and use it.
It can save everyone time if you look in the Perl FAQs first, instead of
having a list of people refer you to the Perl FAQs :) You can learn
about 'perldoc' by typing:

"perldoc perldoc"

At your command prompt. You can also view documentation online at:

http://www.perldoc.com and http://www.perl.com

  2.8 Is this a high traffic list?
YES! You have been warned! If you don't want to get ~100 emails per day
from this list, consider subscribing to the digest.

  2.9 Other tips before posti

RE: File Monitoring

2004-05-10 Thread Wiggins d Anconia
> > -Original Message-
> > From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, May 10, 2004 4:36 PM
> > To: PerlDiscuss - Perl Newsgroups and mailing lists; 
> > [EMAIL PROTECTED]
> > Subject: Re: File Monitoring
> 
> [snip]
> 
> > There is a directory watching component in POE 
> 
> Where to find doc on that (link) ?
> 

http://search.cpan.org/~cholet/POE-Component-DirWatch-0.01/DirWatch.pm

> >or you could grow your own, sorry
> >I can't provide the one I have (licensing issues).
> 
> Why did you re-invented the wheel ;)
> Or Am I missing some basic infos ?
> 

Good question.  Several reasons, mostly dealing with our application
overall.

1. The component mentioned is a very good example of using POE's inline
sessions to do a polling type of activity but isn't terribly robust (I
don't believe it was designed nor needs to be as a core component).
 
2. The callback interface didn't quite suit our needs as we were going
for more of an overall OOP structure and wanted continuity across the
app components.

3. I found it difficult to manage the directory watchers, for a couple
it would be sufficient but we were talking about upwards of 40 to start,
with more coming in the future.  One of the key goals of our app was to
have the ability to pause/resume as well as start/stop a particular
watcher at any given time, the session based watcher made this more
difficult (in my mind) than an object based one.

4. As a production app in a financial organization we needed a lot of
logging, and scalability, but could sacrifice development time and
maintenance.  We also wanted the logging to be seemless across the app,
so we built the logging directly into the watcher we made.

In the end because of the simplicity of the base module I don't know
that we reinvented the wheel, more like just put a nice steel belted
tire around it :-).  The underlying session that forms the core of the
component is still intact, the same events are used, but the data
structure itself is more accessible and the HEAP usage was dropped in
favor of a standard OOP hash.  These things made it simpler to control
the session since it is just a basic Perl object and will allow us to
change the implementation in the future if need be since it is
completely encapsulated (aka no fussing with POE events outside the
object's internal implementation).

I am still attempting to get the organization to allow me to release it,
that or I may build "my own" from scratch and incorporate it into
another app that I can release :-).  But there is no timeline for all of
that...

http://danconia.org

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: File Monitoring

2004-05-10 Thread NYIMI Jose (BMB)
> -Original Message-
> From: Dani Pardo [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 10, 2004 4:25 PM
> To: [EMAIL PROTECTED]
> Subject: Re: File Monitoring
> 
> 
> Hi, I've done this app. What I do is put into a file the 
> output of 
> ls -lR /directory_to_watch.
>   Then use diff to compare the results. This gives the 
> advantage that, 
> if a line starts with +, then a new file has been added. If 
> it's -,  a 
> file has been deleted :)

Is this a joke  ? :-)

Here's a typical diff output:

17,18d16
< (who writes under the
< pseudonym "Omniscient Trash")
45,46c43,44
< soon every Tom, Dick or Harry
< will be writing his own Perl book
---
> soon every Tom, Randal and Larry
> will be writing their own Perl book
69a68,69
> Copyright (c) 1998, The Perl Journal.
> All rights reserved.

José.


 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Piping output mutt perl

2004-05-10 Thread Paul D. Kraus
I have a perl script that parses an email.
I use mutt and then just use the pipe command.
I would like to be able to pipe the output of my script then to mutt to send the 
parsed email to someone else.
I can do this in mutt but just hitting the pipe char then typeing the name of my 
script then | again and the mutt syntax.

The only problem is thats kind of lengthy i would like to have a script wrap my script 
that would have the mutt command built into it.
or better yet just in the normal script pipe the out put of script to mutt instead of 
stdout.

I know this can be done but for the life of me can't find it.

-- 
Paul D. Kraus
~=~=~=~=~=~=~=~=~=~=~=~=~
~ Network Administrator ~
~ PEL Supply Company~
~ 216.267.5775 Voice~
~ 216.267.6176 Fax  ~
~=~=~=~=~=~=~=~=~=~=~=~=~
~   www.pelsupply.com   ~
~=~=~=~=~=~=~=~=~=~=~=~=~

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: Piping output mutt perl

2004-05-10 Thread Paul D. Kraus
On Mon, May 10, 2004 at 12:23:44PM -0400, Paul D. Kraus wrote:
> I have a perl script that parses an email.
> I use mutt and then just use the pipe command.
> I would like to be able to pipe the output of my script then to mutt to send the 
> parsed email to someone else.
> I can do this in mutt but just hitting the pipe char then typeing the name of my 
> script then | again and the mutt syntax.
> 
> The only problem is thats kind of lengthy i would like to have a script wrap my 
> script that would have the mutt command built into it.
> or better yet just in the normal script pipe the out put of script to mutt instead 
> of stdout.
> 
> I know this can be done but for the life of me can't find it.
> 

Got it open (STDOUT, "|cmd" )

:)
-- 
Paul D. Kraus
~=~=~=~=~=~=~=~=~=~=~=~=~
~ Network Administrator ~
~ PEL Supply Company~
~ 216.267.5775 Voice~
~ 216.267.6176 Fax  ~
~=~=~=~=~=~=~=~=~=~=~=~=~
~   www.pelsupply.com   ~
~=~=~=~=~=~=~=~=~=~=~=~=~

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: File Monitoring

2004-05-10 Thread NYIMI Jose (BMB)


> -Original Message-
> From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 10, 2004 6:02 PM
> To: NYIMI Jose (BMB); PerlDiscuss - Perl Newsgroups and 
> mailing lists; [EMAIL PROTECTED]
> Subject: RE: File Monitoring
> 
> 
> > > -Original Message-
> > > From: Wiggins d Anconia [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, May 10, 2004 4:36 PM
> > > To: PerlDiscuss - Perl Newsgroups and mailing lists; 
> > > [EMAIL PROTECTED]
> > > Subject: Re: File Monitoring
> > 
> > [snip]
> > 
> > > There is a directory watching component in POE
> > 
> > Where to find doc on that (link) ?
> > 
> 
> http://search.cpan.org/~cholet/POE-Component-DirWatch-0.01/DirWatch.pm
> 
> > >or you could grow your own, sorry
> > >I can't provide the one I have (licensing issues).
> > 
> > Why did you re-invented the wheel ;)
> > Or Am I missing some basic infos ?
> > 
> 
> Good question.  Several reasons, mostly dealing with our 
> application overall.
> 
> 1. The component mentioned is a very good example of using 
> POE's inline sessions to do a polling type of activity but 
> isn't terribly robust (I don't believe it was designed nor 
> needs to be as a core component).
>  
> 2. The callback interface didn't quite suit our needs as we 
> were going for more of an overall OOP structure and wanted 
> continuity across the app components.
> 
> 3. I found it difficult to manage the directory watchers, for 
> a couple it would be sufficient but we were talking about 
> upwards of 40 to start, with more coming in the future.  One 
> of the key goals of our app was to have the ability to 
> pause/resume as well as start/stop a particular watcher at 
> any given time, the session based watcher made this more 
> difficult (in my mind) than an object based one.
> 
> 4. As a production app in a financial organization we needed 
> a lot of logging, and scalability, but could sacrifice 
> development time and maintenance.  We also wanted the logging 
> to be seemless across the app, so we built the logging 
> directly into the watcher we made.
> 
> In the end because of the simplicity of the base module I 
> don't know that we reinvented the wheel, more like just put a 
> nice steel belted tire around it :-).  The underlying session 
> that forms the core of the component is still intact, the 
> same events are used, but the data structure itself is more 
> accessible and the HEAP usage was dropped in favor of a 
> standard OOP hash.  These things made it simpler to control 
> the session since it is just a basic Perl object and will 
> allow us to change the implementation in the future if need 
> be since it is completely encapsulated (aka no fussing with 
> POE events outside the object's internal implementation).
> 
> I am still attempting to get the organization to allow me to 
> release it, that or I may build "my own" from scratch and 
> incorporate it into another app that I can release :-).  But 
> there is no timeline for all of that...
> 

Thanks for sharing your thoughts.

Watching a directory for incoming files is very common need
In organization like Telecom Mobile Operator (my current job).
We have to deal with proprietary systems (Nokia, Siemens, Alcatel).
Sometimes the only interaction that you have with those systems is
to watch a predefined directory to see if a new file has been created by those "black 
boxes".
Then start a process which treat the file's content
(Billing or CDR (Call Details Records) in general ).
Since the treatment can take long time, you need multitask behavior.

We have developed perl scripts to do the job but without POE.
I always thought that POE could provide a better alternative.

Learning POE is in my pipe for a while
But still not have time to start :).

Thanks again,

José.


 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: File Monitoring

2004-05-10 Thread Dani Pardo
NYIMI Jose (BMB) wrote:

Is this a joke  ? :-)

Here's a typical diff output:

17,18d16
< (who writes under the
< pseudonym "Omniscient Trash")
45,46c43,44
< soon every Tom, Dick or Harry
< will be writing his own Perl book
---
 

soon every Tom, Randal and Larry
will be writing their own Perl book
   

69a68,69
 

Copyright (c) 1998, The Perl Journal.
All rights reserved.
   

 

 Don't use diff with the actual files!, use diff to compare the file 
listing that dives "ls". Here is my code (this script is called every 
10min from crond):

#!/usr/bin/perl -w

# Store the new file listing
system("ls -lR   /home/originals > /tmp/Originals_PDF/pdflist.2");
# If ther's an older listing,
if( -r "/tmp/Originals_PDF/pdflist.1")
{
  # Create a diff file that contains the diference between listings
  system("diff /tmp/Originals_PDF/pdflist.1 
/tmp/Originals_PDF/pdflist.2 > /tmp/Originals_PDF/pdf.diff");
  open (FD, "/tmp/Originals_PDF/pdf.diff");
  # Foreach file in the diff
  while()
   {
 if (/^\>/) # If they start with > (a new file)
   {
 push @originals, $_;
}
   }
  close(FD);
  unlink("/tmp/Originals_PDF/pdf.diff");
 }

# Update the listing
system("cp /tmp/Originals_PDF/pdflist.2 /tmp/Originals_PDF/pdflist.1");
# If we find a newly-added file, we send an e-mail
if(defined (@originals))
 {
 open (MAIL, "|mail -s '---Notificacio creacio PDF'  
[EMAIL PROTECTED]");
 print MAIL "Listing of newly added files::\n\n";
 foreach $arxiu (@originals)
  {
print MAIL "$arxiu";
  }
 close(MAIL);
 }



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



RegExp Help !

2004-05-10 Thread amjoe11-3
Hi Gurus !

Well need your help in framing a RegExp

I've to parse for the  tag in a HTML/ASP file and then when i get that i need
to get only yhe action filepath in to an array ! How do i do it ?

For Example 



i need only the "register/doregister.asp" in an array !

Please Help.

Thanks in Advance
Joe

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: RegExp Help !

2004-05-10 Thread David Dorward
On 10 May 2004, at 17:42, <[EMAIL PROTECTED]> wrote:
Well need your help in framing a RegExp

I've to parse for the  tag in a HTML/ASP file and then when i 
get that i need
to get only yhe action filepath in to an array ! How do i do it ?
Parse::HTML would suggest itself rather then a regex.

For Example



i need only the "register/doregister.asp" in an array !
my $html = qq();
(my $action) = ( $html =~ /action=\"([^\"]*)\"/ );

Replace "my $action" when whatever array location you want to load it 
into.

--
David Dorward
 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: [Perl-beginners] RegExp Help !

2004-05-10 Thread Remko Lodder
Hey Joe,

[EMAIL PROTECTED] wrote:

Hi Gurus !
I am not a Guru, i am a newb :-)
Well need your help in framing a RegExp

I've to parse for the  tag in a HTML/ASP file and then when i get that i need
to get only yhe action filepath in to an array ! How do i do it ?
For Example 



i need only the "register/doregister.asp" in an array !
my $FilePath[0] = "register/doregister.asp";

You mean like that? or you want to fetch it?

while (my $line =~ m/.*(action=.*)\"\>/ ) {
   my $FilePath = $1;
}
or something similiar

Note that i think that these might be options , but then again, i am 
just a newb like you :-)

Please Help.
Tried to
Thanks in Advance
No Problem
Joe
Remko

--
--
Kind regards,

Remko Lodder
Elvandar.org/DSINet.org
www.mostly-harmless.nl Dutch community for helping newcomers on the 
hackerscene

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



uniq & sort (GNU apps) for Windows -- http://unxutils.sourceforge.net/

2004-05-10 Thread shawn_milochik




Just an FYI, after reading one of the posts in the digest I receive for
this list.

There are 121 GNU command-line apps for the Win32 environment.
The download is a .zip file, about 3.2 megs.  I hope some of you find joy
in
your Windows use with it.


http://unxutils.sourceforge.net/

Including:

uniq
sort
grep & egrep
tar

And plenty of others.  I just throw them all into my c:\windows\system32
directory.
I am a Linux user, but I have to use Windows at work.  These tools make it
bearable.

Note:
If you are using Windows XP, some files (such as find.exe) will
automatically
be overwritten by XP with the Windows find.exe, which is pretty useless.  I
copy
the GNU find.exe as lfind.exe (Linux Find, although I suppose gfind would
be
more appropriate).


Shawn




**
This e-mail and any files transmitted with it may contain 
confidential information and is intended solely for use by 
the individual to whom it is addressed.  If you received
this e-mail in error, please notify the sender, do not 
disclose its contents to others and delete it from your 
system.

**


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Reading a .dbm file

2004-05-10 Thread Mame Mbodji
Does anyone know how to read a dbm file. I tried this, but in vain:

$db = 'test.dbm';   

dbmopen(%DATA, $db, 0644) or die "Can't open DB_File $db : $!\n";

while(($key,$values) = each(%DATA)) {

print "$key has value of $value\n";

}

I do not get any data back. When I look at the file, it has some funny
characters!
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


Problems with Perl CPAN on Solaris 9

2004-05-10 Thread Richard Crawford
I'm trying to use the CPAN module to install new modules on my Solaris 9
 server.  I've logged in as root, and I've tried the following:
$ perl -MCPAN -e 'shell'

cpan> install HTML::Parse

...and this is what the output looks like:

Running install for module HTML::Parse
Running make for S/SB/SBURKE/HTML-Tree-3.18.tar.gz
  Is already unwrapped into directory /.cpan/build/HTML-Tree-3.18
  Has already been processed within this session
Running make test
 Unsatisfied dependencies detected during
[S/SB/SBURKE/HTML-Tree-3.18.tar.gz] -
HTML::Tagset
HTML::Parser
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
Running make install
  make had returned bad status, install seems impossible
  Delayed until after prerequisites
Running install for module HTML::Tagset
Running make for S/SB/SBURKE/HTML-Tagset-3.03.tar.gz
  Is already unwrapped into directory /.cpan/build/HTML-Tagset-3.03
  Has already been processed within this session
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
Running install for module HTML::Parser
Running make for G/GA/GAAS/HTML-Parser-3.36.tar.gz
  Is already unwrapped into directory /.cpan/build/HTML-Parser-3.36
  Has already been processed within this session
Running make test
 Unsatisfied dependencies detected during
[G/GA/GAAS/HTML-Parser-3.36.tar.gz] -
HTML::Tagset
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes]
Running make install
  make had returned bad status, install seems impossible
  Delayed until after prerequisites
Running install for module HTML::Tagset
Running make for S/SB/SBURKE/HTML-Tagset-3.03.tar.gz
  Is already unwrapped into directory /.cpan/build/HTML-Tagset-3.03
  Has already been processed within this session
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
Running make for G/GA/GAAS/HTML-Parser-3.36.tar.gz
  Is already unwrapped into directory /.cpan/build/HTML-Parser-3.36
  Has already been processed within this session
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
Running make for S/SB/SBURKE/HTML-Tree-3.18.tar.gz
  Is already unwrapped into directory /.cpan/build/HTML-Tree-3.18
  Has already been processed within this session
Running make test
  Can't test without successful make
Running make install
  make had returned bad status, install seems impossible
Any ideas?  I have gcc installed and the CPAN configuration is pointing
to the gcc installation, so I'm not sure what the problem might be.
--
Richard S. Crawford
Programmer III,
UC Davis Extension Distance Learning Group (http://unexdlc.ucdavis.edu)
(916)327-7793 / [EMAIL PROTECTED]


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: Problems with Perl CPAN on Solaris 9

2004-05-10 Thread Wiggins d Anconia


> I'm trying to use the CPAN module to install new modules on my Solaris 9
>   server.  I've logged in as root, and I've tried the following:
> 
> $ perl -MCPAN -e 'shell'
> 
> cpan> install HTML::Parse
> 
> ...and this is what the output looks like:
> 
> 

[snip]

> 
> 
> Any ideas?  I have gcc installed and the CPAN configuration is pointing
> to the gcc installation, so I'm not sure what the problem might be.
> 

The output you showed us is just CPAN complaining that it has already
failed to install the modules during the same session, which doesn't
really help us at all.  Try exiting CPAN, then go back in and try to
install the prerequisites individually, if one of them fails provide the
output after the initial failure.

http://danconia.org


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: File Monitoring

2004-05-10 Thread Robin Sheat
On Mon, May 10, 2004 at 08:35:53AM -0600, Wiggins d Anconia wrote:
> There is a directory watching component in POE or you could grow your
There is also the FAM daemon, which taps into the kernel to do it. I'm 
sure that there is a perl module to talk to that.

-- 
Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0x776DB663 Fingerprint=DD10 5C62 1E29 A385 9866 0853 CD38 E07A 776D B663


pgp0.pgp
Description: PGP signature


Re: Piping output mutt perl

2004-05-10 Thread Robin Sheat
On Mon, May 10, 2004 at 12:23:44PM -0400, Paul D. Kraus wrote:
> The only problem is thats kind of lengthy i would like to have a
> script wrap my script that would have the mutt command built into it.
Or just bind a button to it in ~/.muttrc, so that mutt does all the hard 
work.

-- 
Robin <[EMAIL PROTECTED]> JabberID: <[EMAIL PROTECTED]>

Hostes alienigeni me abduxerunt. Qui annus est?

PGP Key 0x776DB663 Fingerprint=DD10 5C62 1E29 A385 9866 0853 CD38 E07A 776D B663


pgp0.pgp
Description: PGP signature


Using 'last' in for loop, and putting subst-regex within an 'if'

2004-05-10 Thread Matthew Miller
Hello.  I've been hacking on Erik Oliver's rather
nice setext-to-html script, refining it beyond the
original interpretations of setext back in 2002. 
I've run into two major snags that my limited
knowledge
of Perl is not allowing me to get past.  I'd
appreciate
any pointers or assistance anyone can offer.

I've included the complete script, and the example
setext file I test it with.

The problems:

1.  The setext twodot-typotag ('..' on a line by
itself), is intended to indicate the logical end of
textual information in a file.  So, the script
should stop parsing the file when it encounters that
tag. [Side note: two periods beginning a line are
used  for other reasons, too, so _only_ two periods
alone on a line indicate the end of text].  However,
in
loop2  within the script, I've tried adding a simple:

if (/^\.\.\s*$/) {last;}

and it won't work.

2.  I'm trying to implement the note-typotag.  This
one is a two-part construction, consisting of a hot
tagged word in the text (word followed by
underscore: hot_ ) and a note tag to define the
content:
.. _hot Note content here.

I've hacked the href parsing piece to collect the
notes ok.  (Hrefs substitute a URL for the note
content and are otherwise identical.)  I can't seem
to find any variation on the hot-word parser that
allows me to tag both hrefs and notes.  
 
I'm really frustrated right now, so if I've left out
necessary details, I apologise.  Let me know and
I'll clarify.

Thanks for any help,
Matthew
--
mcm




__
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs  
http://hotjobs.sweepstakes.yahoo.com/careermakeover 

setext2html.pl
Description: setext2html.pl


test.etx
Description: test.etx
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 


modifying text files using Inline editing

2004-05-10 Thread Timothy Duke
Hi,
I have got two versions of a script to eliminate single line-feeds from 
a file.  The first one does weird stuff - duplicating lines and messing 
the text file up.  The second one works (I copied it from a Perl guide), 
but I don't understand why.  I would much prefer the first one to work - 
Can you tell me how to change the first one to make it work?

Also, I understand that the <> operator reads in one line at a time.  If 
I wish to eliminate only triple line-feeds (\n\n\n) and leave double and 
single linefeeds, I presume <> won't work.  Without reading in the whole 
file at once, how can I achieve this?

I am using MacPerl.
Thanks for any help!
Tim

Version #1 (works dreadfullystuffs up the file)
#! perl  -w -i
$filetobechanged = "iBook HD:Desktop Folder:tim.txt";
open(FILE, "+< $filetobechanged") ;
while () {
s/\n//g;
print FILE ;
}
close(FILE);
Version #2 (works fine)
$filetobechanged = "iBook HD:Desktop Folder:tim.txt";
@ARGV = ($filetobechanged);
$^I = ".bak";
while (<>) {
s/\n//g;;
print;
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



editing files inline, searching for \n\n\n

2004-05-10 Thread Timothy Duke
Hi,
I have got two versions of a script to eliminate single line-feeds from 
a file.  The first one does weird stuff - duplicating lines and messing 
the text file up.  The second one works (I copied it from a Perl guide), 
but I don't understand why.  I would much prefer the first one to work - 
Can you tell me how to change the first one to make it work?

Also, I understand that the <> operator reads in one line at a time.  If 
I wish to eliminate only triple line-feeds (\n\n\n) and leave double and 
single linefeeds, I presume <> won't work.  Without reading in the whole 
file at once, how can I achieve this?

I am using MacPerl.
Thanks for any help!
Tim

Version #1 (works dreadfullystuffs up the file)
#! perl  -w -i
$filetobechanged = "iBook HD:Desktop Folder:tim.txt";
open(FILE, "+< $filetobechanged") ;
while () {
s/\n//g;
print FILE ;
}
close(FILE);
Version #2 (works fine)
$filetobechanged = "iBook HD:Desktop Folder:tim.txt";
@ARGV = ($filetobechanged);
$^I = ".bak";
while (<>) {
s/\n//g;;
print;
}
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: inline editing of files, searching for \n\n\n

2004-05-10 Thread WilliamGunther
In a message dated 5/10/2004 12:22:06 AM Eastern Daylight Time, 
[EMAIL PROTECTED] writes:
>Hi,
>
>I have got two versions of a script to eliminate single line-feeds from
>a file.  The first one does weird stuff - duplicating lines and messing
>the text file up.  The second one works (I copied it from a Perl guide),
>but I don't understand why.  I would much prefer the first one to work -
>Can you tell me how to change the first one to make it work?
>
>Also, I understand that the <> operator reads in one line at a time.  If
>I wish to eliminate only triple line-feeds (\n\n\n) and leave double and
>single linefeeds, I presume <> won't work.  Without reading in the whole
>file at once, how can I achieve this?
>
>[codes snipped]
>

Working off your sample code, how about:

$filetobechanged = "iBook HD:Desktop Folder:tim.txt";
@ARGV = ($filetobechanged);
$^I = ".bak";
$/ = "\n\n\n";
while (<>) {
 s/\n\n\n/;
 print;
}

-will 
http://www.wgunther.tk
(the above message is double rot13 encoded for security reasons)

Most Useful Perl Modules
-strict
-warnings
-Devel::DProf
-Benchmark
-B::Deparse
-Data::Dumper
-Clone
-Perl::Tidy
-Beautifier
-DBD::SQLite 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: inline editing of files, searching for \n\n\n

2004-05-10 Thread Jose Alves de Castro
> The first one does weird stuff

Looks like -i only works with '<>', not with '' (though I could
not find that documented).

> Can you tell me how to change the first one to make it work?

If you really need to do that, try 'open(STDIN,$filetobechanged)'
instead. Then, 'while(<>)' instead of 'while()' and 'print'
instead of 'print FILE'.


Side notes: always use strict :-)

Oh, and if you're just trying to remove \n's, try chomp instead of that
substitution :-) much, much faster :-)

And there are even easier ways, like this one :-)

#!/usr/bin/perl -wl0pi

Right, no code needed :-) The switches do it all :-) Give it a try :-)

HTH

jac

On Mon, 2004-05-10 at 05:22, Timothy Duke wrote:
> Hi,
> 
> I have got two versions of a script to eliminate single line-feeds from 
> a file.  The first one does weird stuff - duplicating lines and messing 
> the text file up.  The second one works (I copied it from a Perl guide), 
> but I don't understand why.  I would much prefer the first one to work - 
> Can you tell me how to change the first one to make it work?
> 
> Also, I understand that the <> operator reads in one line at a time.  If 
> I wish to eliminate only triple line-feeds (\n\n\n) and leave double and 
> single linefeeds, I presume <> won't work.  Without reading in the whole 
> file at once, how can I achieve this?
> 
> I am using MacPerl.
> 
> Thanks for any help!
> 
> Tim
> 
> 
> 
> Version #1 (works dreadfullystuffs up the file)
> 
> #! perl  -w -i
> $filetobechanged = "iBook HD:Desktop Folder:tim.txt";
> open(FILE, "+< $filetobechanged") ;
> while () {
>  s/\n//g;
>  print FILE ;
>  }
> close(FILE);
> 
> 
> Version #2 (works fine)
> $filetobechanged = "iBook HD:Desktop Folder:tim.txt";
> @ARGV = ($filetobechanged);
> $^I = ".bak";
> while (<>) {
>  s/\n//g;;
>  print;
> }
-- 
Josà Alves de Castro <[EMAIL PROTECTED]>
Telbit - Tecnologias de InformaÃÃo


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




installing DBI on HPUX

2004-05-10 Thread Christian Stalp
Hello together,
I have a problem! I use a HP-PaRisc Server with HPUX 10.20 and I just tried
to install the DBI-module for Perl.

After calling: perl Makefile.PL I got this warning:
Warning: prerequisite Test::More failed to load: Can't locate Test/More.pm in 
@INC (@INC contains: lib /opt/perl5/lib/5.6.0/PA-RISC1.1 /opt/perl5/lib/5.6.0 
/opt/perl5/lib/site_perl/5.6.0/PA-RISC1.1 /opt/perl5/lib/site_perl/5.6.0 
/opt/perl5/lib/site_perl .) at (eval 8) line 3, <> line 1.

After that the make dosn't work either!
What can I do?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




File Monitoring

2004-05-10 Thread PerlDiscuss - Perl Newsgroups and mailing lists
Hi there,

Can anyone recommend a good way to have a perl script that constantly
monitors for the creation of new files on UNIX and launches another
process?

Thanks!

Cheers,
Ben


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: installing DBI on HPUX

2004-05-10 Thread David Dorward
On 10 May 2004, at 11:44, Christian Stalp wrote:
I just tried to install the DBI-module for Perl.
Can't locate Test/More.pm
After that the make dosn't work either!
What can I do?
Install Test::More first.
(You might want to check out the CPAN module, which can be configured 
to auto-install dependancies for you)

--
David Dorward
 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



RE: editing files inline, searching for \n\n\n

2004-05-10 Thread Charles K. Clarkson
Timothy Duke <[EMAIL PROTECTED]> wrote:
: 
: Also, I understand that the <> operator reads in one
: line at a time.  If I wish to eliminate only triple
: line-feeds (\n\n\n) and leave double and single
: linefeeds, I presume <> won't work.  Without reading
: in the whole file at once, how can I achieve this?

The diamond operator uses the record separator ($/)
to determine what a line ending looks like. By setting
this to "\n\n\n" we get "lines" that have "\n\n\n" at
the end. Conveniently, 'chomp' also uses $/ to figure
out what needs to be lopped off a line.

It is best to limit a change in $/. The 'local'
function does this in a code block.

{
local $/ = "\n\n\n";
while (  ) {
chomp;
print;
}
}

# $/ back to its old value

__END__
 foo

 foo


 foo
 foo

HTH,

Prints:
 foo

 foo foo
 foo

HTH,

Charles K. Clarkson
-- 
Mobile Homes Specialist
254 968-8328


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: installing DBI on HPUX

2004-05-10 Thread Christian Stalp
I tryed it at another way. I got an older version: DBI-1.21 because I still 
use perl 5.6 not 5.6.1!

perl Makefile.pl works, all is fine.

But now I get this:

(Bundled) cc: warning 480: The -A option is available only with the C/ANSI C 
product; ignored.
(Bundled) cc: warning 480: The -O option is available only with the C/ANSI C 
product; ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with the 
C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +z option is available only with the C/ANSI C 
product; ignored.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 532: error 
1000: Unexpected symbol: "nbytes".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 533: error 
1000: Unexpected symbol: "elements".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 534: error 
1000: Unexpected symbol: "size_t".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 532: error 
1506: Parameters allowed in function definition only.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 533: error 
1705: Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 533: error 
1573: Type of "size" is undefined due to an illegal declaration.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 534: error 
1705: Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 534: error 
1573: Type of "nbytes" is undefined due to an illegal declaration.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 537: error 
1705: Function prototypes are an ANSI feature.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 1816: error 
1000: Unexpected symbol: "SV".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/iperlsys.h", line 411: 
warning 5: "const" will become a keyword.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/iperlsys.h", line 411: 
error 1000: Unexpected symbol: "const".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/regexp.h", line 13: error 
1000: Unexpected symbol: "U8".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/sv.h", line 329: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/sv.h", line 330: error 
1000: Unexpected symbol: "ANY".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/sv.h", line 331: error 
1000: Unexpected symbol: "GV".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/cv.h", line 25: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/cv.h", line 26: error 
1000: Unexpected symbol: "ANY".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/cv.h", line 27: error 
1000: Unexpected symbol: "GV".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 14: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 14: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 15: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 15: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 16: error 
1000: Unexpected symbol: "U32".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 16: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 17: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 17: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 18: error 
1000:
Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 18: error 
1000:
Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/mg.h", line 23: error 
1000:
Unexpected symbol: "MAGIC".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/utf8.h", line 25: warning 
5: "const" will become a keyword.
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/utf8.h", line 25: error 
1000: Unexpected symbol: "unsigned".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 1852: error 
1000: Unexpected symbol: "CURCUR".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 2058: error 
1000: Unexpected symbol: "*".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 2059: error 
1000: Unexpected symbol: "I32".
(Bundled) cc: "/opt/perl5/lib/5.6.0/PA-RISC1.1/CORE/perl.h", line 2059: error 
1000: Unexpected symbol: "SV".
(Bundled) cc: error 2017: Cannot recover from earlier errors, terminating.
*** Error exit code 1

Stop.
---


It seems to me that I have some trouble with my c-compiler ???!

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: installing DBI on HPUX

2004-05-10 Thread NYIMI Jose (BMB)
> -Original Message-
> From: Christian Stalp [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 10, 2004 12:44 PM
> To: [EMAIL PROTECTED]
> Subject: installing DBI on HPUX
> 
> 
> Hello together,
> I have a problem! I use a HP-PaRisc Server with HPUX 10.20 
> and I just tried to install the DBI-module for Perl.
> 
> After calling: perl Makefile.PL I got this warning:
> Warning: prerequisite Test::More failed to load: Can't locate 
> Test/More.pm in 

It seems that you don't have Test::More module installed.
Install Test::More first then install DBI.

An alternative is to use the CPAN module which will auto-install
dependencies for you
http://search.cpan.org/~timb/DBI-1.42/lib/Bundle/DBI.pm

Good luck,

José.



 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: Problem using File::RsyncP module

2004-05-10 Thread NYIMI Jose (BMB)

-Original Message-
From: BERTHOLD Jean [mailto:[EMAIL PROTECTED] 
Sent: Saturday, May 08, 2004 3:45 PM
To: [EMAIL PROTECTED]
Cc: BERTHOLD Jean
Subject: Problem using File::RsyncP module

[snip]

I have never used File::RsyncP module but here
Are some of the thinks that raised doubt to me:
Do not comment the
use strict;
;)

#$rs->remoteStart(0, [EMAIL PROTECTED]::PWJA_arc);

The doc of File::RsyncP said :

$rs->remoteStart(0, destDirectory);

Your [EMAIL PROTECTED]::PWJA_arc arg is not like a directory
and should be between single quote if it was a correct argument.


#$rs->go($srcRep);
#$rs->serverClose;

#$rs->serverConnect("udaipur", 873);
#$rs->serverService("PWJA_arc", "", "", 0);

The doc said:
$rs->serverService($module, $authUser, $authPasswd, 0);
You provided an empty user and an empty password, strange !

José.


 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: editing files inline, searching for \n\n\n

2004-05-10 Thread John W. Krahn
Timothy Duke wrote:
> 
> Hi,

Hello,

> I have got two versions of a script to eliminate single line-feeds from
> a file.

You should use chomp() to remove newlines.  Using the substitution
operator globally is forcing the whole line to be scanned.

> The first one does weird stuff - duplicating lines and messing
> the text file up.

That is because you are using '+<', the read/write mode.

> The second one works (I copied it from a Perl guide),
> but I don't understand why.

That is because Perl's <> operator and the $^I variable do all the work
behind the scenes of managing your file and the backup file.

> I would much prefer the first one to work -
> Can you tell me how to change the first one to make it work?

Yes.

> Also, I understand that the <> operator reads in one line at a time.

It opens one "line" at a time where a "line" is defined by the value of
the input record separator ($/) which is set to "\n" by default.

> If
> I wish to eliminate only triple line-feeds (\n\n\n) and leave double and
> single linefeeds, I presume <> won't work.  Without reading in the whole
> file at once, how can I achieve this?

Set the input record separator to paragraph mode.


> 
> 
> Version #1 (works dreadfullystuffs up the file)
> 
> #! perl  -w -i
> $filetobechanged = "iBook HD:Desktop Folder:tim.txt";
> open(FILE, "+< $filetobechanged") ;

You should *ALWAYS* verify that the file opened correctly.


> while () {
>  s/\n//g;
>  print FILE ;

In read/write mode you read line one and then print over line two and
then read line three and then print over line four, etc.


>  }
> close(FILE);
> 
> Version #2 (works fine)
> $filetobechanged = "iBook HD:Desktop Folder:tim.txt";
> @ARGV = ($filetobechanged);
> $^I = ".bak";
> while (<>) {
>  s/\n//g;;
>  print;
> }

If I understand correctly, you can achieve what you want like this:

#! perl -w
use strict;
( $/, $^I, @ARGV ) = ( '', '.bak', 'iBook HD:Desktop Folder:tim.txt' );
print while <>;


However, since you seem to want to open the files yourself, you could do
it like this:

#! perl -w
use strict;

my $filetobechanged = 'iBook HD:Desktop Folder:tim.txt';
my $backup_file = "$filetobechanged.bak";

rename $filetobechanged, $backup_file
or die "Cannot rename $filetobechanged, $backup_file: $!";

open BACK, '<', $backup_file or die "Cannot open $backup_file: $!";
open FILE, '>', $filetobechanged or die "Cannot open $filetobechanged:
$!";

$/ = '';  # Set paragraph mode

while (  ) {
print FILE;
}

close BACK;
close FILE;

__END__



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




RE: installing DBI on HPUX

2004-05-10 Thread NYIMI Jose (BMB)

> -Original Message-
> From: Christian Stalp [mailto:[EMAIL PROTECTED] 
> Sent: Monday, May 10, 2004 1:27 PM
> To: [EMAIL PROTECTED]
> Cc: David Dorward
> Subject: Re: installing DBI on HPUX
> 
> 
> I tryed it at another way. I got an older version: DBI-1.21 
> because I still 
> use perl 5.6 not 5.6.1!
> 
> perl Makefile.pl works, all is fine.
> 
> But now I get this:
> 
> (Bundled) cc: warning 480: The -A option is available only 
> with the C/ANSI C 
> product; ignored.

I have done a quick search and these treads seems interesting to you:

http://www.bitmechanic.com/mail-archives/dbi-users/Mar1998/0777.html

I got the same errors the first time I compiled DBI.
My solution was to install gcc and recompile perl.
My system was a bare-bones HP-UX 10.20.
It sounds like you are useing the brain-dead cc that comes with HP.


http://www.mail-archive.com/[EMAIL PROTECTED]/msg16347.html

You either need the HP ANSI C compiler or GCC. Since you seem to use a perl
which was build using the HP ANSI C compiler it's easiest to install that
compiler on the system you're trying to get DBI to work. However, you need
to PAY for that compiler so you might want to switch to GCC. I'm not
entirely sure if you would need to recompile perl itself with GCC for that
to work. (would be best no doubt)



HTH,

José.


 DISCLAIMER 

"This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer".

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 




Re: installing DBI on HPUX

2004-05-10 Thread Christian Stalp



> You either need the HP ANSI C compiler or GCC. Since you seem to use a perl
> which was build using the HP ANSI C compiler it's easiest to install that
> compiler on the system you're trying to get DBI to work. However, you need
> to PAY for that compiler so you might want to switch to GCC. I'm not
> entirely sure if you would need to recompile perl itself with GCC for that
> to work. (would be best no doubt)

Hello, I allready installed gcc but the Makefile calls the HPUX-cc compiler. 
(CC = cc )
How can I tell the system to use the gcc instead of the cc?

Gruss Christian

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]