Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: getting parts of the strings from a file into managable variables

by my_perl (Initiate)
on Nov 12, 2004 at 18:01 UTC ( [id://407451]=note: print w/replies, xml ) Need Help??


in reply to Re: getting parts of the strings from a file into managable variables
in thread Help:getting parts of the strings from a file into managable variables

Hi, thanks a lot for response, it is working great. What do i need to change if i have spaces before strings, and number of spaces is not constant? Thanks again :) Aida
  • Comment on Re^2: getting parts of the strings from a file into managable variables

Replies are listed 'Best First'.
Re^3: getting parts of the strings from a file into managable variables
by Eimi Metamorphoumai (Deacon) on Nov 12, 2004 at 18:26 UTC
    Hmmm, you might try changing the regexp to something like
    my ($key, $value) = m{^\s*<([^>]+)>\s*(.*)<}i;
    Although I'm starting to agree with the others that a real XML parser might be the way to go.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://407451]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2024-04-19 19:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found