Re: XML Parsing

2007-06-24 Thread Chas Owens
On 6/24/07, 吴小勇 <[EMAIL PROTECTED]> wrote: XML::XPath? Something related with DRM(DIgital Rights Management)? Not in the slightest. You may want to read this http://search.cpan.org/~msergeant/XML-XPath-1.13/XPath.pm

Re: XML Parsing

2007-06-24 Thread 吴小勇
XML::XPath? Something related with DRM(DIgital Rights Management)? 2007/6/25, Prabu Ayyappan <[EMAIL PROTECTED]>: Hi, Have you tried XML::XPath for this one.It may help you. Thnx and Rgds, [EMAIL PROTECTED] Mike Blezien <[EMAIL PROTECTED]> wrote: I need to parse a fairly large XML response f

Re: XML Parsing

2007-06-24 Thread Prabu Ayyappan
Hi, Have you tried XML::XPath for this one.It may help you. Thnx and Rgds, [EMAIL PROTECTED] Mike Blezien <[EMAIL PROTECTED]> wrote: I need to parse a fairly large XML response file and would like some suggestions on which XML module would work the best. We've been using the XML::Simple modul

Re: Conditional in regex

2007-06-24 Thread John W. Krahn
Jeff wrote: On 6/24/07 10:42 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Probably a list of hashes would be the most natural. my @LoH = map { { split } } $file_contents =~ /\{(.*?)\}/gs; Thanks. That's cool. Since this is the beginner's list, I'll just dive in and ask a(nother) d

XML Parsing

2007-06-24 Thread Mike Blezien
I need to parse a fairly large XML response file and would like some suggestions on which XML module would work the best. We've been using the XML::Simple module, but I don't think that's the right one for the job. Below is the XML file we need to parse. In particular getting the data from the e

Re: Conditional in regex

2007-06-24 Thread Jeff
On 6/24/07 10:42 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > You don't need to repeat the pattern by hand - the /g will do that for > you. > Thanks to everyone for the replies. I expected what you pointed out above, that /\b(w+)\s+(\w+)\s+/gs would match every instance of the patte

Re: Conditional in regex

2007-06-24 Thread John W. Krahn
[EMAIL PROTECTED] wrote: On Jun 24, 3:31 am, [EMAIL PROTECTED] (Jeff) wrote: Second, and equally important, what kind of data structure should I put the results in? I think I need a hash of hashes Probably a list of hashes would be the most natural. my @LoH = map { { split } } $file_contents

Re: Inherit a database connection object

2007-06-24 Thread Tom Phoenix
On 6/24/07, Patrik Hasibuan <[EMAIL PROTECTED]> wrote: I want to write once a script as a part of building a connection to my MySQL DB server. The parts only use a kind of vabiable such as "$dbh". Is it possible? It's possible. In fact, that's what most of us do with objects. #!/usr/bin/perl

Re: Proper class setup?

2007-06-24 Thread Chas Owens
On 6/24/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: snip I pretty much have a very small idea of what is going on up there. snip Alright, lets walk through it piece by piece then. > our %fields = ( >_id => 1, >_queue=> 1, >_owner=> 1, >_priorit

Inherit a database connection object

2007-06-24 Thread Patrik Hasibuan
Dear all, I am still new in Perl especially in its OOP concept. I want to write once a script as a part of building a connection to my MySQL DB server. The parts only use a kind of vabiable such as "$dbh". Is it possible? main.pl #!/usr/bin/perl -w use iterdir;

Re: Perl vs. Java for string manipulation & regex

2007-06-24 Thread Tom Phoenix
On 6/24/07, Jeni Zundel <[EMAIL PROTECTED]> wrote: 1. Is the java significantly slower than the perl script because I suck at writing efficient java code or because perl is just really that much better at string manipulation? Yes. If it's important to determine how much of your slowdown is d

Re: Compile perl into binary code for speed increase?

2007-06-24 Thread [EMAIL PROTECTED]
On Jun 23, 12:04 pm, [EMAIL PROTECTED] (Howa) wrote: > > Are there any method to compile the perl script for performance > increase, sth similar to mod_perl? pperl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Perl vs. Java for string manipulation & regex

2007-06-24 Thread Jeni Zundel
So, recently, I wrote a nice little perl script to go through a moderately large file (about 400 Meg fixed record length file of rows that are 1870 characters wide). It runs quite fast; provides accurate results and I'm happy with it. My employer doesn't want to use it because it's in perl

Re: [OT] DELIVERY FAILURE: Delivery time expired

2007-06-24 Thread Dr.Ruud
Cc: list-owner(AT)perl.org Tom Allison schreef: > This is getting annoying > > It might be useful if objectorb.com would actually provide some > reason for delivery beyond "Delivery time expired". There is no need to send this to the list, so to all of its many subscribers. Send it to the lis

Re: Conditional in regex

2007-06-24 Thread [EMAIL PROTECTED]
On Jun 24, 3:31 am, [EMAIL PROTECTED] (Jeff) wrote: > Hi all. I'm new to perl, a new programmer, and I badly need guidance. I'm > trying to parse a config file with key/value pairs seperated by white space > and surrounded by curly brackets. It has multiple fields that look like > this: > > { > Key

Fwd: DELIVERY FAILURE: Delivery time expired

2007-06-24 Thread Tom Allison
This is getting annoying It might be useful if objectorb.com would actually provide some reason for delivery beyond "Delivery time expired". Considering the string '***SPAM***' appears to be something I might find in SpamAssassin, and some people are starting to apply smtp rejections to

Re: Help parsing a CSV file

2007-06-24 Thread Tom Phoenix
On 6/24/07, Mihir Kamdar <[EMAIL PROTECTED]> wrote: I have a csv file having 3rd field as phone number series. In that field, some of the records are phone number ranges like 097611/4 Now I need to seperate this into 4 numbers and store them one after the other, like:- 097611 097612 097613 097

Re: Help parsing a CSV file

2007-06-24 Thread Rodrick Brown
On 6/24/07, Mihir Kamdar <[EMAIL PROTECTED]> wrote: Hi, I have a csv file having 3rd field as phone number series. In that field, some of the records are phone number ranges like 097611/4 Now I need to seperate this into 4 numbers and store them one after the other, like:- 097611 097612 097613

Help parsing a CSV file

2007-06-24 Thread Mihir Kamdar
Hi, I have a csv file having 3rd field as phone number series. In that field, some of the records are phone number ranges like 097611/4 Now I need to seperate this into 4 numbers and store them one after the other, like:- 097611 097612 097613 097614 There are more than 1000 records in the csv

Re: grep from one file and write to another

2007-06-24 Thread Vahid Moghaddasi
On 6/24/07, Tom Phoenix <[EMAIL PROTECTED]> wrote: On 6/23/07, Vahid Moghaddasi <[EMAIL PROTECTED]> wrote: But maybe you need the actual password file. You got it, I have to read /etc/passwd file only. > I am not sure how much I can read into memory space without affecting > other programs

Re: Proper class setup?

2007-06-24 Thread Mathew Snyder
Chas Owens wrote: > On 6/22/07, Mathew Snyder <[EMAIL PROTECTED]> wrote: > snip >> I'm not sure what you mean by "Change your new() in a new() and init()". > snip >> What do you mean by "set/get approach"? > snip > > Some people believe that new should just create a new blank object and > call an