Re: Outlook CSV Parser

2007-08-10 Thread Laxminarayan G Kamath A
On Wed, 30 May 2007 12:14:52 -0400, "Chas Owens" <[EMAIL PROTECTED]> wrote: ... > http://www.perl.com/pub/a/2004/06/25/profiling.html > http://search.cpan.org/~nwclark/perl-5.8.8/utils/dprofpp.PL > The following code seems to speed up the parsing by two orders of > magnitude (2.214 seconds

Re: Outlook CSV Parser

2007-05-31 Thread Dr.Ruud
"Mumia W." schreef: > Laxminarayan G Kamath A: >> http://download.deeproot.in/~kamathln/outlook-encrtypted-sample.csv > > Well I asked for it. :-) > > It's impossible to tell where one record ends and another record > begins with that file. Maybe not, because the rule was that it ends at newline,

Re: Outlook CSV Parser

2007-05-31 Thread Dr.Ruud
Laxminarayan G Kamath A: > Ruud: >> You forgot to supply a link to such a file. Or show a __DATA__ >> section for testing. > > http://download.deeproot.in/~kamathln/outlook-encrtypted-sample.csv OK, lets check how wellformed it is: perl -we' local $/; $_ = <>; s/"[^"]*"//g; s/(?<=,)[^",

Re: Outlook CSV Parser

2007-05-31 Thread Mumia W.
On 05/31/2007 02:32 AM, Laxminarayan G Kamath A wrote: http://download.deeproot.in/~kamathln/outlook-encrtypted-sample.csv Well I asked for it. :-) It's impossible to tell where one record ends and another record begins with that file. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

Re: Outlook CSV Parser

2007-05-31 Thread Laxminarayan G Kamath A
On Wed, 30 May 2007 10:38:40 +0200, "Dr.Ruud" <[EMAIL PROTECTED]> wrote: > You forgot to supply a link to such a file. Or show a __DATA__ section > for testing. http://download.deeproot.in/~kamathln/outlook-encrtypted-sample.csv -- Cheers, Laxminarayan G Kamath A e-mail: [EMAIL PROTECTED] Work

Re: Outlook CSV Parser

2007-05-30 Thread Chas Owens
On 5/30/07, Ken Foskey <[EMAIL PROTECTED]> wrote: snip CSV is a horrible format. Far too unreliable, we have exported CSV from excel that imported differently into excel. snip Just pedantic nitpick, but CSV is an incredibly reliable format, the problem is find programs that actually use CSV r

Re: Outlook CSV Parser

2007-05-30 Thread Chas Owens
On 5/30/07, Laxminarayan G Kamath A <[EMAIL PROTECTED]> wrote: snip Any ways of optimising it further? snip Premature optimization is the root of all evil. Have you profiled the code yet? If not then here is some documentation that will point you in the right direction http://www.perl.com/pu

Re: Outlook CSV Parser

2007-05-30 Thread Ken Foskey
On Wed, 2007-05-30 at 13:34 +0530, Laxminarayan G Kamath A wrote: > What I am expecting is help with the variant of the regex I used as the > condition for while loop. I am sure If we modify that regexp a little > bit, then we can just use it on the record like this : > > $_ = $record; > @fields

Re: Outlook CSV Parser

2007-05-30 Thread Mumia W.
On 05/30/2007 03:04 AM, Laxminarayan G Kamath A wrote: [...] I tried a lot of different ways but just could not get the right regexp :-(. I reiterate what the eminent Dr. Ruud said. I need some data to play with before I play with the code you posted. -- To unsubscribe, e-mail: [EMAIL P

Re: Outlook CSV Parser

2007-05-30 Thread Dr.Ruud
Laxminarayan G Kamath A schreef: > The stubling blocks : there are several types of problems in > Outlook's CSV .. You forgot to supply a link to such a file. Or show a __DATA__ section for testing. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

Re: Outlook CSV Parser

2007-05-30 Thread Laxminarayan G Kamath A
On Wed, 30 May 2007 01:26:30 -0500, "Mumia W." wrote: > The Perl module Text::CSV_XS would make your work much simpler, and > it might execute a little faster. Thank you for pointing out .. but we have already tried it! Unfortunately, it failed to seperate the records in the right fashion. We h

Re: Outlook CSV Parser

2007-05-30 Thread Mumia W.
On 05/30/2007 12:40 AM, Laxminarayan G Kamath A wrote: Hi PERLers, We here at DeepRoot Linux were trying to parse Outlook's csv so that I can add them to ldap addressbook.. [...] The Perl module Text::CSV_XS would make your work much simpler, and it might execute a little faster. -- To

Re: Outlook CSV Parser

2007-05-29 Thread Laxminarayan G Kamath A
On Wed, 30 May 2007 11:10:00 +0530, Laxminarayan G Kamath A <[EMAIL PROTECTED]> wrote: > The attached file is what I have > come up to.. but it still takes more ... Had forgotten to attach the file.. -- Cheers, Laxminarayan G Kamath A e-mail: [EMAIL PROTECTED] Work URL: http://deeproot.in #!/

Outlook CSV Parser

2007-05-29 Thread Laxminarayan G Kamath A
Hi PERLers, We here at DeepRoot Linux were trying to parse Outlook's csv so that I can add them to ldap addressbook.. After several futile tries around with lots of built in packages, we decided it was up to us to device an algorithm. As time was of importance , we wrote a "well it works!