Re: speed test

2009-12-04 Thread Dave Tang
On Sat, 05 Dec 2009 10:07:34 +1000, Jenda Krynicky wrote: what was the name of that law? Something that said that the speed of computers doubles every ??? years. Were you referring to this? http://en.wikipedia.org/wiki/Moore's_law Dave -- Using Opera's revolutionary e-mail client: http:/

Re: REGEX first occurence

2009-12-04 Thread Uri Guttman
> "JJ" == Jackie Jackie writes: JJ> I just want to replace the first occurrence of fish by red JJ> bird. The second occurrence by brown bear. etc. then you should have stated this in the first posting. it was not clear at all what you wanted. >> fish/red bird >> fish/brown bear >

Re: conditional index of arrays

2009-12-04 Thread Eric Mooshagian
On Dec 4, 2009, at 8:32 AM, Shlomi Fish wrote: On Friday 04 Dec 2009 06:10:16 Eric Mooshagian wrote: Dear All, This is my first post. I present some subroutines that 1) create an index for one or more arrays and then 2) get summary statistics based on the index. I have 2 issues: First

Re: REGEX first occurence

2009-12-04 Thread Jackie Jackie
Thanks for your rely. I just want to replace the first occurrence of fish by red bird. The second occurrence by brown bear. etc. On Thursday 03 Dec 2009 16:10:56 Jackie Jackie wrote: > Thanks for your help. > > You solve the problem with concatenate the qw (red etc) with fish. How to > sol

Re: speed test

2009-12-04 Thread Jenda Krynicky
From: Rob Coops > > A daily job that by the sound of it will not be changing a whole lot, jut > get executed pretty much till the end of times... C is your friend. Perl > would certainly get the job done and on time without to much problems, but > if you are worried there isn't much that will ou

Re: newline regexes

2009-12-04 Thread Shawn H Corey
John W. Krahn wrote: > Shawn H Corey wrote: >> $data =~ s{ (? ^^ > Replace pattern with nothing. Oh oh! $data =~ s{ (?http://learn.perl.org/

Re: newline regexes

2009-12-04 Thread John W. Krahn
Shawn H Corey wrote: jackassplus wrote: I am trying to remove single newlines but not double newlines. for instance say I have the following: Name:\nMy Name\n\nAddress:\n123 Anywhere St\n\nAbout Me:\nSome text that\nhas some newlines that\nI want to be rid of\n\nThe End\n I want to get rid of

Re: newline regexes

2009-12-04 Thread jackassplus
>The string "\\n" will not match a newline, it will match the two >characters '\' and 'n'. I believe that's what I'm doing. Here is my "test harness" until I get this worked out: Input is from an XML File. #!/usr/bin/perl -w # load modules use DBI; use XML::Simple; # create xml object $xml = ne

RE: ERROR: malformed header

2009-12-04 Thread Hellman, Matthew
Make sure you have 2 CR/LF between your headers and your message payload. It looks like the payload is being interpreted as headers. >>-Original Message- >>From: Raheel Hassan [mailto:raheel.has...@gmail.com] >>Sent: Wednesday, December 02, 2009 4:26 AM >>To: beginners@perl.org >>Cc: beg

Re: newline regexes

2009-12-04 Thread Shawn H Corey
jackassplus wrote: > I am trying to remove single newlines but not double newlines. > > for instance say I have the following: > Name:\nMy Name\n\nAddress:\n123 Anywhere St\n\nAbout Me:\nSome text > that\nhas some newlines that\nI want to be rid of\n\nThe End\n > > I want to get rid of all of the

Re: speed test

2009-12-04 Thread Uri Guttman
> "m" == matt writes: >> One should note that there's also the overhead of the bash loop here. m> Valid, but I considered it to be irrelevant as both executables were m> subjected to the same loop. did you read my comments on your 'benchmark'? the fork/exec overhead is large and not

Re: newline regexes

2009-12-04 Thread John W. Krahn
jackassplus wrote: I am trying to remove single newlines but not double newlines. for instance say I have the following: Name:\nMy Name\n\nAddress:\n123 Anywhere St\n\nAbout Me:\nSome text that\nhas some newlines that\nI want to be rid of\n\nThe End\n I want to get rid of all of the newlines be

Re: speed test

2009-12-04 Thread matt
On Dec 3, 6:56 am, shlo...@iglu.org.il (Shlomi Fish) wrote: > Hi matt! > > On Wednesday 02 Dec 2009 18:29:53 matt wrote: > > > > > On Dec 1, 8:58 pm, practicalp...@gmail.com wrote: > > > Hello, > > > > Maybe it's not so suitable to ask this here. > > > But is there a good way (code sample?) to impl

Re: REGEX first occurence

2009-12-04 Thread Shlomi Fish
On Thursday 03 Dec 2009 16:10:56 Jackie Jackie wrote: > Thanks for your help. > > You solve the problem with concatenate the qw (red etc) with fish. How to > solve the problem by search and replace. > > > fish/red bird > fish/brown bear > fish/lion > red fish/animal > I don't understand. s///

Re: conditional index of arrays

2009-12-04 Thread C.DeRykus
On Dec 3, 8:10 pm, ericmooshag...@gmail.com (Eric Mooshagian) wrote: > I present some subroutines that  1) create an index for one or more   > arrays and then 2) get summary statistics based on the index. I have 2   > issues: > > 1. I would like to be able to create the index conditional on the  

newline regexes

2009-12-04 Thread jackassplus
I am trying to remove single newlines but not double newlines. for instance say I have the following: Name:\nMy Name\n\nAddress:\n123 Anywhere St\n\nAbout Me:\nSome text that\nhas some newlines that\nI want to be rid of\n\nThe End\n I want to get rid of all of the newlines between Me:\n and the n

Re: speed test

2009-12-04 Thread Teo
Dear Matt, On Dec 2, 5:29 pm, matthew.leonha...@gmail.com (Matt) wrote: > > Maybe it's not so suitable to ask this here. > > But is there a good way (code sample?) to implement a speed test > > between Perl and C? > > For a project which handles lots of data we want to know how slower > > perl is

Re: Need to process Excel sheet through Perl

2009-12-04 Thread Parag Kalra
I have one more question related to the module - 'Spreadsheet-ParseExcel' I want to extract the default header names of the excel sheet. So basically I am looking for a method to extract the column names whose default values are 'A', 'B', 'C', 'D' etc. Thus I am looking for a function which would

Re: Need to process Excel sheet through Perl

2009-12-04 Thread Shlomi Fish
On Friday 04 Dec 2009 12:15:58 Rene Schickbauer wrote: > Xiao Lan (小兰) wrote: > > On Fri, Dec 4, 2009 at 3:40 PM, Parag Kalra wrote: > >> Hello All, > >> > >> I am looking for some good Perl modules to process excel sheets. > > > > Hi, > > > > If you just want a module, take a look at this one (I

Re: conditional index of arrays

2009-12-04 Thread Shlomi Fish
On Friday 04 Dec 2009 06:10:16 Eric Mooshagian wrote: > Dear All, > > This is my first post. > > I present some subroutines that 1) create an index for one or more > arrays and then 2) get summary statistics based on the index. I have 2 > issues: > First of all, based on a cursory look of your

Re: speed test

2009-12-04 Thread Rene Schickbauer
Xiao Lan (小兰) wrote: Hi! Also, with both languages, you will have an IO bottleneck. Yes IO is really the bottleneck I have seen that. You can greatly reduce IO wait if you write the data to a different disk than you read from. Speed up things even more, consider using a hardware RAID contr

Re: Need to process Excel sheet through Perl

2009-12-04 Thread Rene Schickbauer
Xiao Lan (小兰) wrote: On Fri, Dec 4, 2009 at 3:40 PM, Parag Kalra wrote: Hello All, I am looking for some good Perl modules to process excel sheets. Hi, If you just want a module, take a look at this one (I once used it): http://search.cpan.org/~jmcnamara/Spreadsheet-ParseExcel-0.55/lib/Sp