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.