Hi, I am very new to perl and i would be very thankful for all help you can give me. I am trying to make a program that will extract info from a file and them do some statistic analysis with it. I need for every UserID to get all the variables. As you can see they are distributed throughout the file. Any suggestions on how should i approach this? File is in following format: <UserID>46786<UserID>
<start>2004-10-21TO09:57:25Z</start>
<dev>Some Text</dev>
<var1>some string</var1>
<var2>some string</var2>
<USerID>57864</UserID>
<start>2004-10-25TO09:57:25Z</start>
<dev>Some Text</dev>
<var1>some string</var1>
<UserID>46786<UserID>
<var3>some string</var3>
<var4>some string</var4>
<UserID>98766</UserID>
<start>2004-10-21TO09:57:25Z</start>
<dev>Some Text</dev>
<var1>some string</var1>
<var2>some string</var2>
<var5>some string</var5>
<var6>some string</var6>
<USerID>57864</UserID>
<var4>some string</var4>
<var6>some string</var6>

In reply to Help:getting parts of the strings from a file into managable variables by my_perl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.