Sorting an Array with classobjects

2003-02-27 Thread Nils-Anders Persson
Hello Perlgurus! I have made a small program that creates some instances of a classobject and puts them into an array. I want to sort this array in order of a specific value in the class. I was thinking of something like this but it doesn't work @sortarr = sort byvalue (@unsortedobjectarray) sub

XML::Parser, getting parent from the char_handler

2003-01-31 Thread Nils-Anders Persson
Hello, Another XML-question. When the char_handler in XML::Parser is called it's easy to find which element that called it, but is there an easy way to tell the parent of the calling element? Regards, Nils-Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

XML -> Perl-variables using XML::Parser

2003-01-29 Thread Nils-Anders Persson
Hello good people! I have a bit of a problem with turning this piece of XML into a Perl-variable using the XML::Parser. Earlier i have used the XML::Dt parser to do this and it works, but the amount of data is to big for the later (takes to much time to parse through the file). I wonder if there i

Parsing XML

2003-01-27 Thread Nils-Anders Persson
Hello Perl-gurus, I have made a program that parses through a XML-document using the XML::DT. My problem is that I have to parse very big files > 2 Gb and the XML::DT is a bit slow. I split the file and process smaller chunks so that the memory usage doesn't go through the roof but it still takes

How bad is it to use global variables?

2003-01-23 Thread Nils-Anders Persson
Hello, I've seen many discussions regarding the use of "use strict". What i wonder is why is it so bad using global variables? And another question how do you define constants in perl? regards, Nils-Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Adding new path to @INC

2003-01-20 Thread Nils-Anders Persson
Hello PERL-gurus, I wonder if there is a way to add a new path to the @INC-array permanently under UNIX and, if so, how to do it. Regards, Nils-Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]