hello,
I want to ask a theoretic question.

my data is(from a radius file)- one record shown:
beurs3-ISDN Password = "Beurs6.65ISDN" User-Service = Framed-User, Framed-Protocol = MPP, Framed-Address = 212.233.6.65, Framed-Netmask = 255.255.255.224, Ascend-Route-IP = Route-IP-Yes, Ascend-Metric = 3
This is read from a flat file. I can parse it but i want to do it nice I thought of putting the username in a array and put the rest in a hash(I think this is a array of hashes).
But I need a feature so you can look-up on username(no prob in the array) and then fetch the rest of the hash. But I also need to give the possibility to look-up on ip. Is this possibly? Can someone guide me or give his views on the best method?

I'm still hacking on it, I will post later what I've found.

--
My opinions may have changed,
but not the fact that I am right


In reply to hashes & looking up by toadi

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.