Re: need to include and install CPAN modules as part of application stack

2011-01-27 Thread Uri Guttman
> "BL" == Ben Lavery writes: BL> Personally, I'd like to see a way of executing a perl BL> script/application in such a way that Perl runs off and grabs any BL> required modules from CPAN (if the user has permission, of BL> course). that makes very little sense. what if the program i

Re: need to include and install CPAN modules as part of application stack

2011-01-27 Thread Ben Lavery
Personally, I'd like to see a way of executing a perl script/application in such a way that Perl runs off and grabs any required modules from CPAN (if the user has permission, of course). Ben On 27 Jan 2011, at 21:05, Mark Meyer wrote: > Hello all, > > > > > > I need to include CPAN modu

Re: parse data from a report file

2011-01-27 Thread loan tran
John and Rob, Thanks a lot for the pointers. Very helpfull. --- On Thu, 1/27/11, Rob Dixon wrote: > From: Rob Dixon > Subject: Re: parse data from a report file > To: beginners@perl.org > Cc: "loan tran" > Date: Thursday, January 27, 2011, 11:33 AM > On 27/01/2011 06:58, loan tran > wrote: >

RE: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread Mark Meyer
Ok I took your code and your "log" file and did some testing on my linux box. this small snippet of code seems to parse the lines (you actually want to grab) in a predictable manner. tm while(( my $line = )) { # print "my line is: >$line<", "\n"; if ($line =~ /^\[/) { print

Re: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread CM Analyst
This is a sample of the data I am reading in:   [#|2011-01-19T07:05:10.734-0800|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=15;_ThreadName=httpSSLWorkerThread-8080-1;_RequestID=c5cefdc4-4651-4c77-b9e6-84f9e0f6609e;|] com.raec.cq.CQCommitException: You wanted to commit a mo

Re: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread Parag Kalra
When you are already storing the line under $line >>>while(( my $line = )) { Then why are you using $_ >>>my @fields = split '\|', $_; Cheers, Parag On Thu, Jan 27, 2011 at 12:57 PM, CM Analyst wrote: > Hello, > > In the following script my goal is pull the date value each time an error > va

RE: Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread Mark Meyer
Can you send an example of the data in the log file? tm -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Need help with Use of uninitialized value in concatenation (.) or string

2011-01-27 Thread CM Analyst
Hello, In the following script my goal is pull the date value each time an error value (hardcoded) is found in the specified log file. The script retrieves the error value without a problem but I cannot seem get the date value. Can anyone tell me what I need to do? The error message when I run

Re: Regex

2011-01-27 Thread Dr.Ruud
On 2011-01-27 03:56, Ramesh Kumar wrote: my $list_of_list = eval $data; # we get an anonymous list of list Looks like you didn't get the memo yet. :) String eval is normally not what you want. I only use it in exceptional cases. At least first check the contents of $data. That normally lea

need to include and install CPAN modules as part of application stack

2011-01-27 Thread Mark Meyer
Hello all, I need to include CPAN modules as part of our custom "application stack". Currently we have a custom "application stack" that we distribute to our customers via CD. The application stack is primarily JBoss in nature. This custom "application stack" is installed on to a ta

Re: Regex

2011-01-27 Thread Rob Dixon
On 27/01/2011 06:23, Ramesh Kumar wrote: Hi Rob, I refer to your 2 lines of code: my $data = '<{5, 26}{20, 42, 64}{23, 48}>'; my $list = [ map { [ $_ =~ /\d+/g ] } $data =~ /(\{.*?\})/g ]; That's the type of Perl coding style I'm still trying to learn. Concise and elegant. Beautiful!!!

Re: Out of memory, HTML::TableExtract

2011-01-27 Thread C.DeRykus
On Jan 27, 3:29 am, jinstho...@gmail.com (Jins Thomas) wrote: > On Thu, Jan 27, 2011 at 4:44 PM, C.DeRykus wrote: > > On Jan 26, 11:28 pm, jinstho...@gmail.com (Jins Thomas) wrote: > > > > Hi DeRykus > > > > Sorry for replying late. > > > > I was able to  test DB_File with your example, thanks. Bu

Re: parse data from a report file

2011-01-27 Thread Rob Dixon
On 27/01/2011 06:58, loan tran wrote: Hi All, I'm trying to parse data from a report file and I'm having trouble producing desired results. Here is a data example from the report: PONumber Line InvoicedQty UnitCost Amount Curr Extended Amount FrDate Company Department Acco

Re: Dereference Links

2011-01-27 Thread Mike Flannigan
On 1/25/2011 6:07 PM, Rob and Shawn wrote: Hey Mike What you have written can be fixed by changing it to for (my $num = 0; $num <= $#linkder; $num++) { print STDERR "@{$linkder[$num]}\n"; } or even for (my $num = 0; $num <= $#{$links}; $num++) { print STDERR "@{$links->[$num]}

Re: Out of memory, HTML::TableExtract

2011-01-27 Thread Jins Thomas
On Thu, Jan 27, 2011 at 4:44 PM, C.DeRykus wrote: > On Jan 26, 11:28 pm, jinstho...@gmail.com (Jins Thomas) wrote: >> > > Hi DeRykus > > > > Sorry for replying late. > > > > I was able to test DB_File with your example, thanks. But i'm facing > > a problem. I'm not able to access multi dimension

Re: Redeclaration of variable [different scope]

2011-01-27 Thread C.DeRykus
On Jan 27, 1:51 am, r@aist.go.jp (Raymond Wan) wrote: > Hi all, > > I was wondering if there is a way for Perl to give me a warning if I > redeclare a variable in a different scope (and thus masking the outer > one).  Just spent some time debugging this (which was obviously not my > intention t

Re: Out of memory, HTML::TableExtract

2011-01-27 Thread C.DeRykus
On Jan 26, 11:28 pm, jinstho...@gmail.com (Jins Thomas) wrote: > Hi DeRykus > > Sorry for replying late. > > I was able to  test DB_File with your example, thanks. But i'm facing > a problem. I'm not able to access multi dimensional array with this > DB_File. Address is being stored just a string.

Re: Newbie queries

2011-01-27 Thread John W. Krahn
dolphin wrote: Hi, Hello, Correct me that the "2" in the following means read? : my ( $label, $value ) = split /,/, $line, 2; The third argument to split determines how many list elements will be returned. For example, if: my $line = 'one,two,three,four,five,six,seven'; Then: split /

Re: Newbie queries

2011-01-27 Thread Octavian Rasnita
From: "dolphin" Hi, Correct me that the "2" in the following means read? : my ( $label, $value ) = split /,/, $line, 2; 2 means that the result of the split() function will be a list with 2 elements. You could also use the split() function without that third parameter that specifies the nu

Redeclaration of variable [different scope]

2011-01-27 Thread Raymond Wan
Hi all, I was wondering if there is a way for Perl to give me a warning if I redeclare a variable in a different scope (and thus masking the outer one). Just spent some time debugging this (which was obviously not my intention to give two variables the same name)...and I guess it is a silly mista

Re: Newbie queries

2011-01-27 Thread dolphin
On Jan 25, 6:43 pm, orasn...@gmail.com ("Octavian Rasnita") wrote: > From: "dolphin" > > > > > > > > > > > Hi, > > > I'm learning perl now and would like to find out how to perform the > > following if given in a text file? > > > ,12 > > ,437 > > ,124 > > ,45 > > ,789 > > ,