XML::Parser [was while-problem]

2002-11-15 Thread Sorin Marti
Hi all, I've got the solution which is better tahn the one I've had before: it uses the perl XML:parser #!/usr/bin/perl -w use vars qw(%startsub, %endsub); %startsub = ( "energieverbrauch" => "", "energietraeger" => "", "bezeichnung"=> "", "wert" => "" ); %endsub =

Re: While - Problem

2002-11-15 Thread Sorin Marti
Hello, I am actually reading the o'reilly Perl-book but I just picked out the things I needed. I will follow your advice and read it from the beginning. to the code: at least something happends If I run the script I get following output: wert - 10110 bezeichnung - Hohz, Holzkohle energiev

Re: While - Problem

2002-11-15 Thread John W. Krahn
Sorin Marti wrote: > > Hi all, Hello, > I,ve got a problem. Following Code reads an Example-String in XML-Style, > filters out the necessary information and writes it in a HASH. Now I > want to read a file and not only one String. I thought that I can just > put a while-loop around my code but t

Re: While - Problem

2002-11-15 Thread Ramprasad A Padmanabhan
hey dont expect to be spoon fed every time ok do this On Fri, 2002-11-15 at 14:32, Sorin Marti wrote: > Thanks for answering... > > Now the Script runs but it does not print anything out > > [print $key." - ".$werte{$key}."\n";] > > The script looks like that now... This should work > >

Re: While - Problem

2002-11-15 Thread Sudarshan Raghavan
On Fri, 15 Nov 2002, Ramprasad A Padmanabhan wrote: > This will help you > > open (FILE, " > { > local($/)=undef; > $text = ; This will read the entire file ("text.xml") into $text >} > while($text = ) Making the while here redundant -- To unsubscribe, e-mail: [EMAIL PROT

Re: While - Problem

2002-11-15 Thread Sudarshan Raghavan
On Fri, 15 Nov 2002, Sorin Marti wrote: > Hi all, > > I,ve got a problem. Following Code reads an Example-String in XML-Style, > filters out the necessary information and writes it in a HASH. Now I > want to read a file and not only one String. I thought that I can just > put a while-loop arou

RE: While - Problem

2002-11-15 Thread Beau E. Cox
9:52 PM To: [EMAIL PROTECTED] Subject: While - Problem Hi all, I,ve got a problem. Following Code reads an Example-String in XML-Style, filters out the necessary information and writes it in a HASH. Now I want to read a file and not only one String. I thought that I can just put a while-loop

Re: While - Problem

2002-11-15 Thread Ramprasad A Padmanabhan
This will help you open (FILE, "; } while($text = ) # Parse here Sorin Marti wrote: Hi all, I,ve got a problem. Following Code reads an Example-String in XML-Style, filters out the necessary information and writes it in a HASH. Now I want to read a file and not only one String. I thought

While - Problem

2002-11-14 Thread Sorin Marti
Hi all, I,ve got a problem. Following Code reads an Example-String in XML-Style, filters out the necessary information and writes it in a HASH. Now I want to read a file and not only one String. I thought that I can just put a while-loop around my code but that don't work. How may I solve that.