On Jan 25, 6:43 pm, orasn...@gmail.com (Octavian Rasnita) wrote:
From: dolphin yc282...@yahoo.com.sg
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
,67
CCC,567
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
From: dolphin yc282...@yahoo.com.sg
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
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.
Do
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 to
On Thu, Jan 27, 2011 at 4:44 PM, C.DeRykus dery...@gmail.com 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
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]}\n;
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
On Jan 27, 3:29 am, jinstho...@gmail.com (Jins Thomas) wrote:
On Thu, Jan 27, 2011 at 4:44 PM, C.DeRykus dery...@gmail.com 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.
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!!!
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 target
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
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
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/
When you are already storing the line under $line
while(( my $line = FILEHANDLE)) {
Then why are you using $_
my @fields = split '\|', $_;
Cheers,
Parag
On Thu, Jan 27, 2011 at 12:57 PM, CM Analyst cmanal...@yahoo.com wrote:
Hello,
In the following script my goal is pull the date value
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
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 = FILEHANDLE)) {
# print my line is: $line, \n;
if ($line =~ /^\[/) {
John and Rob,
Thanks a lot for the pointers. Very helpfull.
--- On Thu, 1/27/11, Rob Dixon rob.di...@gmx.com wrote:
From: Rob Dixon rob.di...@gmx.com
Subject: Re: parse data from a report file
To: beginners@perl.org
Cc: loan tran loan...@yahoo.com
Date: Thursday, January 27, 2011, 11:33
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 modules as
BL == Ben Lavery ben.lav...@gmail.com 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
20 matches
Mail list logo