help on comparing lines in a text file

2004-10-11 Thread Alden Meneses
so i have a text file that looks like this 10/04/2004 UPL TZOO CME CRDN WIBC PETD SMF 10/11/2004 UPL TZOO CME WIBC PETD VNBC AMED anyway each line has 1 date field and 100 stock symbols and they are in order. I am trying to compare the different lines to see what has changed. so I open the file

Re: how/where to install xyz.pm from CPAN (no perl Makefile.PL; make; make test; make install)??

2004-10-11 Thread Ken Wolcott
Randy W. Sims wrote: On 10/11/2004 11:01 PM, Ken Wolcott wrote: Hi; I see several very interesting CPAN modules regarding Rational/IBM ClearCase. These are just *.pm files. How/where do I install these? I have root privs. I want the modules to be available in the standard place(s). I guess

Re: how/where to install xyz.pm from CPAN (no perl Makefile.PL; make; make test; make install)??

2004-10-11 Thread Randy W. Sims
On 10/11/2004 11:01 PM, Ken Wolcott wrote: Hi; I see several very interesting CPAN modules regarding Rational/IBM ClearCase. These are just *.pm files. How/where do I install these? I have root privs. I want the modules to be available in the standard place(s). I guess I should just look a

how/where to install xyz.pm from CPAN (no perl Makefile.PL; make; make test; make install)??

2004-10-11 Thread Ken Wolcott
Hi; I see several very interesting CPAN modules regarding Rational/IBM ClearCase. These are just *.pm files. How/where do I install these? I have root privs. I want the modules to be available in the standard place(s). I guess I should just look at the %INC hash and place it in a "good" l

Re: Can do in 1 while loop?

2004-10-11 Thread Mark Goland
- Original Message - From: "loan tran" <[EMAIL PROTECTED]> To: "perl beginners" <[EMAIL PROTECTED]> Sent: Monday, October 11, 2004 3:36 PM Subject: Re: Can do in 1 while loop? > > --- Ramprasad A Padmanabhan > <[EMAIL PROTECTED]> wrote: > > > On Mon, 2004-10-11 at 06:26, loan tran wrote

Re: in a regex- re-arrange $1..$n

2004-10-11 Thread David le Blanc
On Mon, 11 Oct 2004 13:13:37 -0600, Wiggins d Anconia <[EMAIL PROTECTED]> wrote: > > the following is an as yet incomplete regex that i'm working on: > > > > $data = $_ =~ > > s/<(name)>(.*?)<(desc)>(.*?)<(copy)>(.*?)<(license)>(.*?)<(entry)>//xg > > Are you thinking of : ( $a1,$b1,$a2,$b2,$a3,$

RE: in a regex- re-arrange $1..$n

2004-10-11 Thread West, William M
>-Original Message- >From: Wiggins d Anconia [mailto:[EMAIL PROTECTED] >Sent: Monday, October 11, 2004 3:14 PM >To: West, William M; [EMAIL PROTECTED] >Subject: Re: in a regex- re-arrange $1..$n > >> the following is an as yet incomplete regex that i'm working on: >> >> $data = $_ =~ >>

Re: How to process blank line delimeted blocks of text?

2004-10-11 Thread Gunnar Hjalmarsson
Tim Musson wrote: I know I can change the record separator to \n\n to get one dn: section at a time, but how do I then process the individual lines? I don't seem to ever have any luck setting the record separator back to \n... Or am I going about this all wrong? How could we know, when you don't

Re: Course material for perl training

2004-10-11 Thread Randal L. Schwartz
> "Ramprasad" == Ramprasad A Padmanabhan <[EMAIL PROTECTED]> writes: Ramprasad> Sorry for being OT here Ramprasad> Is there any good course material for a perl crash course. I am supposed Ramprasad> to take training in perl and prepare a syllabus , with exercises More people have learned from

Re: Can do in 1 while loop?

2004-10-11 Thread loan tran
--- Ramprasad A Padmanabhan <[EMAIL PROTECTED]> wrote: > On Mon, 2004-10-11 at 06:26, loan tran wrote: > > Hello Perl Gurus, > > > > I wrote a script to search for log suspends and > > bloking processes in a text file and send me email > if > > it find either of them. My codes below work but > i

Re: in a regex- re-arrange $1..$n

2004-10-11 Thread Wiggins d Anconia
> the following is an as yet incomplete regex that i'm working on: > > $data = $_ =~ > s/<(name)>(.*?)<(desc)>(.*?)<(copy)>(.*?)<(license)>(.*?)<(entry)>//xg > > > every other capture ($1 $3 $5 $7 $9) is going to be used one way, the > other > captures will be used differently... i'm wondering

Re: Variable scope in wanted function

2004-10-11 Thread Gunnar Hjalmarsson
Ron Goral wrote: Gunnar Hjalmarsson wrote: One possible solution is to move the ProcessFile() function out from FindPath(), so the former is no longer a nested sub: sub ProcessFile { my ($a_files, $file_name) = @_; push @$a_files, $File::Find::name if $_ eq $file_name; } and

Re: could not find ParserDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX; also need some advice about XML parsing modules on CPAN

2004-10-11 Thread Wiggins d Anconia
> > Ken Wolcott wrote: > > > > > I suppose it is in bad taste to reply to one's own posting, but I have > > > an update. > > > > > > After reading some in the O'Reilly Perl & XML book, reading the email > > > archives of this mailing list, several FAQS that some people mentioned > > > from the

Re: could not find ParserDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX; also need some advice about XML parsing modules on CPAN

2004-10-11 Thread Wiggins d Anconia
> Ken Wolcott wrote: > > > I suppose it is in bad taste to reply to one's own posting, but I have > > an update. > > > > After reading some in the O'Reilly Perl & XML book, reading the email > > archives of this mailing list, several FAQS that some people mentioned > > from the mailing list arc

in a regex- re-arrange $1..$n

2004-10-11 Thread West, William M
the following is an as yet incomplete regex that i'm working on: $data = $_ =~ s/<(name)>(.*?)<(desc)>(.*?)<(copy)>(.*?)<(license)>(.*?)<(entry)>//xg every other capture ($1 $3 $5 $7 $9) is going to be used one way, the other captures will be used differently... i'm wondering if there's a way t

Re: trying to create a daemon

2004-10-11 Thread Radhika
:) Right. I actually did'nt think of it, but now that you mention it, yes. thx. > On Mon, 11 Oct 2004, Radhika Sambamurti wrote: > >> I know there are many tools out there, but I would like to write a >> simple script that can login to a webserver, connect to port (whatever >> port number i give it

Re: could not find ParserDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX; also need some advice about XML parsing modules on CPAN

2004-10-11 Thread ajey
ANother observation is that i'm not finding any problem with this warning/err message. There are no side-effects. The XML:: parser is working correctly. regards -Ajey Quoting Ken Wolcott <[EMAIL PROTECTED]>: > Ken Wolcott wrote: > > > I suppose it is in bad taste to reply to one's own posting,

Perl and Threads

2004-10-11 Thread Eduardo Vázquez Rodríguez
Hello Im writing perl scripts that use threads. Mi goal is that each thread could process an element of an array that has 10 elements, so thread0 process array[0], thread1 process array[1] and so on until thread9 process array[9] Those 10 lines come from a file that Perl reads in chunks of ten l

Re: could not find ParserDetails.ini in /usr/lib/perl5/vendor_perl/5.8.3/XML/SAX; also need some advice about XML parsing modules on CPAN

2004-10-11 Thread Ken Wolcott
Ken Wolcott wrote: I suppose it is in bad taste to reply to one's own posting, but I have an update. After reading some in the O'Reilly Perl & XML book, reading the email archives of this mailing list, several FAQS that some people mentioned from the mailing list archives and another reading of

How to process blank line delimeted blocks of text?

2004-10-11 Thread Tim Musson
I keep trying to do this for different things. I have not found a method I like yet. So here is specifically what I am trying to do *this time*. My current customer has been having problems with members dropping out of various MS Active Directory Security Groups. So I figured I would toss a bit o

Re: Receve and forward email

2004-10-11 Thread Wiggins d Anconia
> From: [EMAIL PROTECTED] > > One part of my job is to read one e-mail from Pop3 and do a forward of > > that e-mail with SMTP to +- 1000 users, just changing the from and the > > to. > > > > There is something that can eseally do this? > > How to do this? > > > > Probably there is some modules t

perl.beginners Weekly list FAQ posting

2004-10-11 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):

Re: Problem using Mailer

2004-10-11 Thread mgoland
Ravi, What is the error msg being produced if any ?? - Original Message - From: "T.S. RaviShankar" <[EMAIL PROTECTED]> Date: Monday, October 11, 2004 10:53 am Subject: Problem using Mailer > Hello, > > The below piece of code doesn't work for me. > > > > $sfile = $req_file

RE: Variable scope in wanted function

2004-10-11 Thread Ron Goral
> -Original Message- > From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] > Sent: Sunday, October 10, 2004 6:32 PM > To: [EMAIL PROTECTED] > Subject: Re: Variable scope in wanted function > > > Ron Goral wrote: > > I am having some difficulty with a module that is using File::Find. > > Th

Re: Receve and forward email

2004-10-11 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > One part of my job is to read one e-mail from Pop3 and do a forward of > that e-mail with SMTP to +- 1000 users, just changing the from and the > to. > > There is something that can eseally do this? > How to do this? > > Probably there is some modules that can do this wo

Re: Variable scope in wanted function

2004-10-11 Thread Jenda Krynicky
From: Gunnar Hjalmarsson <[EMAIL PROTECTED]> > Ron Goral wrote: > > I am having some difficulty with a module that is using File::Find. > > The method is below. > > > > The idea is to enter this method feeding it a file name and > > beginning directory and then looking for all occasions of > > $fi

Re: Problem using Mailer

2004-10-11 Thread T.S. RaviShankar
Thanks for the reply. I did check with "use warnings" . I indeed got few warnings but none of them pertained to the piece of code I showed. The problem is that the code doesn't send any email as it is supposed to. What could have gone wrong if you don't see any problem with the code here ? Thank

Re: Problem using Mailer

2004-10-11 Thread JupiterHost.Net
T.S. RaviShankar wrote: Hello, The below piece of code doesn't work for me. 1) add use strict and use warnings to the code 2) then make the code strict and warnings safe 3) then tell us specifically what you mean by "doesn't work for me" -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Problem using Mailer

2004-10-11 Thread T.S. RaviShankar
Hello, The below piece of code doesn't work for me. $sfile = $req_file; open(RF,"<$req_file"); chop(@rflines=); close(RF); use lib "/remote/xx/yy/SCRIPTS/libnet-1.12/"; use lib "/remote/xx/yy/SCRIPTS/"; use Mail::Mailer; $mailer = Mail::Mailer->new("sendmail"); $mailer->open({From =>

Re: trying to create a daemon

2004-10-11 Thread mgoland
- Original Message - From: Radhika Sambamurti <[EMAIL PROTECTED]> Date: Monday, October 11, 2004 9:52 am Subject: trying to create a daemon > Hi all, > I am a relative newbie and I need to write a small web server load > tester. > I know there are many tools out there, but I would like

Re: Parser

2004-10-11 Thread Wiggins d Anconia
> Hi! > Has anyone tips to create a xml parser!? > i do not know how to start > Well you can always start at CPAN. Do you really want to write a parser, or just need XML parsed? I would suggest not reinventing this wheel. If you just need a parser then check out: http://search.cpan.org/modlist

Re: trying to create a daemon

2004-10-11 Thread Wiggins d Anconia
> Hi all, > I am a relative newbie and I need to write a small web server load tester. > > I know there are many tools out there, but I would like to write a simple > script that can login to a webserver, connect to port (whatever port > number i give it) and do a 'wget https://blah.blah.com :9091

Parser

2004-10-11 Thread E.Horn
Hi! Has anyone tips to create a xml parser!? i do not know how to start -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: trying to create a daemon

2004-10-11 Thread Chris Devers
On Mon, 11 Oct 2004, Radhika Sambamurti wrote: > I know there are many tools out there, but I would like to write a > simple script that can login to a webserver, connect to port (whatever > port number i give it) and do a 'wget https://blah.blah.com :9091". That is to say, you're going to use

trying to create a daemon

2004-10-11 Thread Radhika Sambamurti
Hi all, I am a relative newbie and I need to write a small web server load tester. I know there are many tools out there, but I would like to write a simple script that can login to a webserver, connect to port (whatever port number i give it) and do a 'wget https://blah.blah.com :9091". While th

Re: why can't getstore function overwrite the existing file?

2004-10-11 Thread JupiterHost.Net
Franklin wrote: Hello: Hello, I have encounter a very strange problem. I have the following script: always always always use strict; use warnings; use LWP::Simple; use URI; $base_url="http://finance.yahoo.com";; $filename="finance.htm"; my $base_url ... my $filename ... since theirs no interpolat

Re: Line replace

2004-10-11 Thread Chris Devers
On Mon, 11 Oct 2004, Ramprasad A Padmanabhan wrote: > On Mon, 2004-10-11 at 16:23, Urs Wagner wrote: > > > > I should comment out lines in a text file. I have a lot of troubles > > to realize this. > > > > The lines > > Alpha(a, b, c) > > should be changed to > > # Alpha(a, b, c) > > perl -pli

Re: Can do in 1 while loop?

2004-10-11 Thread Ramprasad A Padmanabhan
On Mon, 2004-10-11 at 06:26, loan tran wrote: > Hello Perl Gurus, > > I wrote a script to search for log suspends and > bloking processes in a text file and send me email if > it find either of them. My codes below work but it's > not efficent. As you can see I open the file and go to > while loop

RE: Line replace

2004-10-11 Thread arjun.mallik
Hai ! Open the file with any file handler and use regular expression.. This way it will work. Open (File handler name ,">>file name"); While ( $string=) { if ( $string = ~ /^Alpha\(a,b,c\)/ ) { $string = "#" . $string ; print$string ; } } Arjun -Original Messa

RE: Line replace

2004-10-11 Thread arjun.mallik
Good one liner I appreciate it .. Arjun -Original Message- From: Ramprasad A Padmanabhan [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 4:41 PM To: Urs Wagner Cc: perl beginners Subject: Re: Line replace On Mon, 2004-10-11 at 16:23, Urs Wagner wrote: > Hello > > I should

Re: Line replace

2004-10-11 Thread Ramprasad A Padmanabhan
On Mon, 2004-10-11 at 16:23, Urs Wagner wrote: > Hello > > I should comment out lines in a text file. I have a lot of troubles to > realize this. > > The lines > Alpha(a, b, c) > should be changed to > # Alpha(a, b, c) > perl -pli.BAK -e 's/(?=.*Alpha\(a, b ,c\))/#/' FILENAME HTH Ram --

RE: why can't getstore function overwrite the existing file?

2004-10-11 Thread Raymond Raj
you have using "$based_url" variable in my $status=getstore($based_url,$filename); but you have declare "$base_url" it's always better using 'use strict' and warnings pragma... -Original Message- From: Franklin [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 3:18 PM To: [EMA

Line replace

2004-10-11 Thread Urs Wagner
Hello I should comment out lines in a text file. I have a lot of troubles to realize this. The lines Alpha(a, b, c) should be changed to # Alpha(a, b, c) What I would like to write is a small perl script to make this convetion. Thanks Urs -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

why can't getstore function overwrite the existing file?

2004-10-11 Thread Franklin
Hello: I have encounter a very strange problem. I have the following script: use LWP::Simple; use URI; $base_url="http://finance.yahoo.com";; $filename="finance.htm"; while(1) { my $status=getstore($based_url,$filename); if(is_success($status)){ print "good\n"; } else { print "bad\n"; } sleep 300

Course material for perl training

2004-10-11 Thread Ramprasad A Padmanabhan
Sorry for being OT here Is there any good course material for a perl crash course. I am supposed to take training in perl and prepare a syllabus , with exercises Thanks Ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: I'm confused: where are the commas for map and sort

2004-10-11 Thread David le Blanc
On Sun, 10 Oct 2004 14:30:32 -0600, Siegfried Heintze <[EMAIL PROTECTED]> wrote: > > The map and the sort statements are strange. Why don't they require a comma > between the first and second arguments? They are not special, they are just using a special semantic built into perl. Consider the fo